After upgrade from ubuntu 20.04 LTS to 22.04.1 LTS, I got a very persistent error:
(Reading database ... 350976 files and directories currently installed.)
Preparing to unpack .../firefox_1%3a1snap1-0ubuntu2_amd64.deb ...
=> Installing the firefox snap
==> Checking connectivity with the snap store
==> Installing the firefox snap
error: cannot perform the following tasks:
- Run hook connect-plug-host-hunspell of snap "firefox" (run hook "connect-plug-
host-hunspell": cannot perform operation: mount --rbind /var/log /tmp/snap.rootf
s_hE2Zj1//var/log: Permission denied)
dpkg: error processing archive /var/cache/apt/archives/firefox_1%3a1snap1-0ubunt
u2_amd64.deb (--unpack):
new firefox package pre-installation script subprocess returned error exit stat
us 1
Please restart all running instances of firefox, or you will experience problems
.
Errors were encountered while processing:
/var/cache/apt/archives/firefox_1%3a1snap1-0ubuntu2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
This
- Run hook connect-plug-host-hunspell of snap "firefox" (run hook "connect-plug-
host-hunspell": cannot perform operation: mount --rbind /var/log /tmp/snap.rootf
s_hE2Zj1//var/log: Permission denied)
was very persistent and was hindering any apt
-involved installations.
Thus, no apt install
nor apt upgrade
was working.
2
Answers
After long search and trying around, where I did:
And then, cave(!) this removes firefox from your installed package list and thus after this command you cannot use firefox any more on your computer until you install it - so I did that - but I had a second computer where I could google around while I had no firefox on that machine. I couldn't install chromium browser or other browsers, because apt was not working! So run this command only when you have a second computer or at least your mobile to surf for instructions!
I found a hint in https://forums.mozillazine.org/viewtopic.php?f=38&t=3097766
My solution was:
save and close that file.
after that, I could do finally:
and then, all
apt
orsnap
commands were working again flawlessly.note:
Now, I encounter
I tried:
But this didn't help.
Finally, I found out the solution!
In former days, when my
/
containing system partition was too full, I sym-linked/var/log
. I linked it to somehwere in my home folder. But then, I moved snap back.The permission was denied, because it tried to mount to a symlink.
All I had to do was:
Now, it is not a symlink any more. So it can actually mount to it.