2

Note: I am using the example of discord but this is for all snap apps that i installed from the software center.

I needed NodeJs for something and had to go through alot of steps as it simply would not install. I had to mess around with alot of files such as bash.bashrc and /etc/environment etc. I have now noticed that snap apps like discord will not open, when i try to uninstall them from the software center or install the executable, i get this error:

/snap/bin$ sudo snap install discord
error: system does not fully support snapd: cannot mount squashfs image using
       "squashfs": exec: "mount": executable file not found in $PATH

While if i try to open it, i get

/snap/bin$ discord
Command 'discord' not found, but can be installed with:
sudo snap install discord

I know it is a paths issue because:

  1. If I open it from the discord folder and run the executable from there, it will work.
  2. It is for all apps that are related to snap, i tried Discord and Docker. Other applications not related with snap will open.
  3. Snap and its applications used to work fine before and did not give me this error.

What i have tried

  1. Installing sqauashfuse0
sudo apt install libsquashfuse0 squashfuse fuse
  1. Fix, create /etc/environment.d/
sudo mkdir /etc/environment.d
sudo echo -e "PATH="/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/snap/bin"\nXDG_DATA_DIRS="/usr/local/share:/usr/share:/var/lib/snapd/desktop"" > /etc/environment.d/60-snap-icons-and-bin.conf
sudo reboot now 

System Details:

Distributor ID: Ubuntu
Description:    Ubuntu 22.04.2 LTS
Release:    22.04
Codename:   jammy

1 Answer 1

2

Solution

I saw this paths issue on snapcraft and they ran the command:

$ sudo cat /proc/$(pidof snapd)/environ | tr "\0" "\n"

The main thing to notice is PATH= which was set incorrectly for me as i had changed /etc/environment. I updated it back to PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin"

After that i tried uninstalling and reinstalling snap:

$ sudo apt remove snapd
$ sudo apt install snapd

After that i uninstalled Discord from the Software Center and then reinstalled it. That seemed to fix it.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .