8

The installation of snaps goes perfectly well, but whenever I try to run a snap after the installation nothing happens (e.g. Notes won't start from the dash). Also non-GUI snaps like hello don't work:

$ hello
cannot locate the core snap: No such file or directory

How could I fix this problem?

Zanna
  • 70,465

3 Answers3

6

I have the hello snap, notes and core installed on my computer and all of them work fine.

$ snap list
Name              Version           Rev  Developer         Notes
core              16.04.1           714  canonical         -
hello             2.10              20   canonical         -
notes             0.9.0~gitb6e3b34  4    notes-developers  -  

When the hello snap is installed, the core snap is installed along with it if core is not already installed. Try updating the core snap:

sudo snap refresh core  

If core is already installed the following message will be shown:

snap "core" has no updates available

Your results of running sudo snap refresh core were as follows:

sudo snap refresh core error: cannot refresh "core": cannot find snap "core"

So uninstall the core snap and then reinstall it.

sudo snap remove core hello  
sudo snap install hello # core will also be installed automatically

Hello is a terminal app that runs like this.

$ hello
Hello, world!
karel
  • 114,770
  • 2
    Thank you for your answer, but now I'm getting the following error:

    ` $ sudo snap install core error: cannot perform the following tasks:

    • Mount snap "core" (714) (cannot install core snap "core" when core snap "ubuntu-core" is already present)

    `

    Refreshing doesn't work:

    $ sudo snap refresh core error: cannot refresh "core": cannot find snap "core"

    And hello still doesn't work ;(

    $ hello cannot locate the core snap: No such file or directory

    – Sander Klootwijk Jan 18 '17 at 10:03
  • Whoops, the layout in the comment above is pretty messed up, I'm a bit new to askubuntu so I don't know how to fix this. But anyway, everything between the " characters is terminal output. – Sander Klootwijk Jan 18 '17 at 10:05
  • I removed the ubuntu-core snap because of that snap, core could not be installed. Then I installed core as you suggested and now everything works fine! Thank you! – Sander Klootwijk Jan 18 '17 at 10:10
5

I did:

sudo snap install core

And that did the trick. Thanks for pointing me in the right direction!

Marcellus
  • 412
  • 1
    I didn't have "core" installed, only "core18". So the manual installation helped me as well. – Slava Fomin II Jan 09 '19 at 08:26
  • I tried uninstalling purging snap-store and snapd as well with apt and snap command. At the end of the snap-store installtion I still have : Run configure hook of "snap-store" snap if present (run hook "configure": cannot locate base snap core20: No such file or directory) –  Nov 16 '22 at 11:48
1

This indicates that you don't have the core snap installed (or broken). You can first check if its installed by

snap list

If it already exists, you can refresh the snap.

snap refresh core

If you face an error like

snap "core" has no updates available

You can remove and again install it. Or, you can do a little trick

snap refresh core --edge

And then, when the problem is fixed, switch it back to stable branch

snap refresh core --stable
acid7
  • 76