4

When I'm trying to run

sudo apt install snapd

It shows the error as below:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package snapd is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'snapd' has no installation candidate

How to resolve this and install snap store in ubuntu ?

I tried to consult official documentation of snap at : https://snapcraft.io/docs/installing-snap-on-ubuntu

and it says:

Snap is pre-installed and ready to go on all recent releases of Ubuntu.

This means, if you’re running Ubuntu 16.04 LTS (Xenial Xerus) or later, including Ubuntu 22.04 LTS (Jammy Jellyfish) and Ubuntu 23.04 (Lunar Lobster), you don’t need to do anything.

But why isn't it in my system then !!

3 Answers 3

13

The above error is happening because APT Package Manager blocks the installation of snap packages.

To enable snap support, we have two options:

Option 1: Delete the nosnap.pref file in the directory /etc/apt/preferences.d by running the command:

sudo rm /etc/apt/preferences.d/nosnap.pref

Option 2: Comment the three lines of code in the same file.

Package: snapd
Pin: release a=*
Pin-Priority: -10

Now, install snapd:

sudo apt install snapd

And then, you can install any snap apps:

sudo snap install <app-name>
2
  • comment - is it #? Commented Feb 17 at 14:18
  • @VasiliiSuricov yes it is. APT doesn't blocks snap by default but in-case the subject error occurs, it is this case.
    – Heisenbug
    Commented Feb 18 at 12:45
0

For me its worked very well! thanks people.

2
  • 2
    This is not answer, please use comments instead of answer area. Commented Oct 29, 2023 at 8:29
  • New users can post only answers, not any comments. 😥
    – koppor
    Commented Aug 21 at 21:44
0

hello LINUXER !

You can follow this STEPS for installation:

deactive nosnap (this file can not allow you using snapd):

sudo mv /etc/apt/preferences.d/nosnap.pref /etc/apt/preferences.d/nosnap~

then install snapd:

sudo apt install -y snapd

Install snap core for better installation:

sudo snap install core

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.