Snapd install/refresh/remove error

Hi,

I’ve been unsuccessfully trying to update Intellij via snap. Snap was running perfectly fine on Ubuntu 18.10, but I’m not sure whether updating to oh-my-zsh or to 19.04 caused snap to break.

Whenever I run a snap command that writes (install/refresh/remove) I get the error:

error: system does not fully support snapd: cannot mount squashfs image using "squashfs": exec:
       "mount": executable file not found in $PATH

I’ve tried to re-install snapd, squashfs, squashfuse and whatnot to no avail. Reading commands such as list or search are working perfectly fine. Adding /bin/snap to the $PATH didn’t change anything as well.

Do you have any suggestions what I could try to make it run again?

Thanks and best regards

Hello!

Could you please paste the output of:

  • cat /etc/os-release
  • snap version
  • which mount
  • sudo cat /proc/$(pidof snapd)/environ | tr "\0" "\n"

thank you!

Hey, sure!

> cat /etc/os-release 
NAME="Ubuntu"
VERSION="19.04 (Disco Dingo)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 19.04"
VERSION_ID="19.04"
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
VERSION_CODENAME=disco
UBUNTU_CODENAME=disco

> snap version
snap    2.38+19.04
snapd   2.38+19.04
series  16
ubuntu  19.04
kernel  5.0.0-15-generic

> which mount
/bin/mount

> sudo cat /proc/$(pidof snapd)/environ | tr "\0" "\n"
LANG=en_US.UTF-8
LC_ADDRESS=de_AT.UTF-8
LC_IDENTIFICATION=de_AT.UTF-8
LC_MEASUREMENT=de_AT.UTF-8
LC_MONETARY=de_AT.UTF-8
LC_NAME=de_AT.UTF-8
LC_NUMERIC=de_AT.UTF-8
LC_PAPER=de_AT.UTF-8
LC_TELEPHONE=de_AT.UTF-8
LC_TIME=de_AT.UTF-8
PATH=$PATH:$JAVA_HOME/bin 
NOTIFY_SOCKET=/run/systemd/notify
LISTEN_PID=1166
LISTEN_FDS=2
LISTEN_FDNAMES=snapd.socket:snapd.socket
WATCHDOG_PID=1166
WATCHDOG_USEC=300000000
INVOCATION_ID=8323c9b6505a4d0995b9ae71c6c43449
JOURNAL_STREAM=9:31602
JAVA_HOME=/usr/lib/jvm/java-11-oracle

Thanks for trying to help me!

that is your problem. snapd (and presumably everything else) has a bogus path. Where is this set?

1 Like

I’ve set my path in /etc/environment (if that is what you need to know)

> cat /etc/environment
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"
JAVA_HOME="/usr/lib/jvm/java-11-oracle"
PATH=$PATH:$JAVA_HOME/bin
export JAVA_HOME
export PATH

Right, the line that uses $PATH etc is bogus, because /etc/environment is not (necessarily) expanded. Do the expansion by hand, restart snapd, and things should be a’ight.

Also the export lines are broken… it’s not a shell file!

1 Like

Hi, I’m sorry, I don’t have too much experience with Ubuntu.

What do you mean by doing the expansion by hand?

Sorry, for the stupid question. :see_no_evil:

edit /etc/environment so that it looks like

PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/usr/lib/jvm/java-11-oracle/bin"
JAVA_HOME="/usr/lib/jvm/java-11-oracle"

that’s it

1 Like

Thousand thanks, it’s working now! :slight_smile:

1 Like