Snap is the new universal package system from Ubuntu that lets you easily and securely install software on all Linux distributions that support Snap. I recommend reading my other article to know more about Snap packages and how to use them.
While Snap packages are an excellent new way of installing applications in Linux distributions, you may encounter a few errors here and there. One such error I covered previously is “snapd returned status code 400“.
But recently one of It’s FOSS reader encountered another Snap error while trying to install VLC 3.0. You might encounter the same error with other applications like Spotify or Skype. Let’s try to troubleshoot it.
Troubleshooting error: snap not found
Before doing anything else, please ensure that you have snapd installed on your system.
0. Make sure that snapd is installed
Open a terminal and run the following command:
snap --version
If the above command shows an error snap command not found, your system doesn't have Snap support installed.
You can install it using your Linux distribution's standard package installation command.
For Debian and Ubuntu-based distributions, use the command below:
sudo apt install snapd
For other distributions, please refer to this tutorial 👇
Once you have ensured that snapd is installed, let’s move forward.
Try to see if your system finds the snap application in question.
For example, if you are trying to install VLC using Snap and your system cannot find the application, try to list all the Snap packages available with ‘v’ or ‘vl’ etc.
You can use the find option of snap command in the following manner:
snap find <search_term>
Now, a lot depends on the result. There are two possibilities here:
1. Snap find command could not find the application
If the output doesn’t consist of the application you were trying to install, it means that the application is not available for your system.
Hold on a second! What did I just say? Is it even possible? If it is not available for your system how can other people be able to install it?
The answer lies in whether you are using a 32-bit or 64-bit operating system. You probably already know that support for 32-bit systems is fading. Newer applications are often developed only for 64-bit systems.
If the Snap application in question is only available for 64-bit systems and you are using a 32-bit system, your Linux distribution won’t see the packages. Hence you see the package not found error while installing it with Snap command.
In other words, you cannot install that application using Snap. Perhaps you can look for the regular installation of that application if it is available in 32-bit format.
2. Snap find command finds the application
The application might be listed in the output of the snap find command. But then what could be the problem in installing the package?
This depends if the Snap package is available in classic. Snap packages by design are secure and they do not interact with the host system. Some applications need to use the host system; hence, a ‘classic mode’ was introduced in Snap packaging.
If the application is available in classic mode, you need to specify that snap needs to be installed in classic mode. This is done by using the –classic flag in the command.
sudo snap install <package_name> --classic
Did it help you?
I hope this quick tip helped you to get rid of the common snap package not found error. Feel free to use the comment section below to provide your feedback.
I highly recommend learning the basic Snap commands if you are new to Snap.