"cannot locate core snap" error

Hello There

I’ve a Manjaro install, it uses an old /home partition from an earlier elementary install.

after installing snapd, and doing snap install hello

it fails at snap run hello saying: cannot locate core snap: no such file or directory

I can’t figure out what to do, I’ve reinstalled a few times by now. I’ve run systemctl commands to check that snapd services are running, and everything looks alright to me there.

any suggestions?

Hey

Can you please give me the output of snap version?

yes

snap unknown snapd unknown series 16 manjaro unknown kernel 4.9.30-1-MANJARO

This looks like a self-built version of snapd. Can you tell me which git commit did you start with?

Is it the “unknown” which makes you think that? Because I have seen “unknown” in some of my systems, and the snap install came from your packages, not self built.

Yes, those indicate the package was built incorrectly. I’d like to understand where they are coming from.

@zyga-snapd What debug info do you need from my two arch (antergos / manjaro) to help?

Arch as in the Arch Linux distribution? If so then that package needs to be updated as last time I checked it was out of date (and we could not update it ourselves). CC @morphis

1 Like

Yes, OP has Manjaro which is based off Arch. I have Manjaro and Antergos, which pull snapd from the same place AIUI.

We already have a bug tracking this. https://bugs.launchpad.net/ubuntu/+source/snapd/+bug/1678040

According to this page https://www.archlinux.org/packages/community/x86_64/snapd/ snapd on Arch is at version 2.25-1, can you confirm that?

Wow, a lot happened here.

To catch up, there’s a thread at he Manjaro forums, where we tried to solve it to no avail.

I installed it through: pacman -S snapd
small update:

pacman -Q -i snapd Name : snapd Version : 2.25-1 Description : Service and tools for management of snap packages. Architecture : x86_64 URL : https://github.com/snapcore/snapd Licenses : GPL3 Groups : None Provides : None Depends On : snap-confine squashfs-tools Optional Deps : None Required By : None Optional For : None Conflicts With : None Replaces : None Installed Size : 26,50 MiB Packager : Timothy Redaelli <timothy.redaelli@gmail.com> Build Date : 2017-05-10T11:14:08 CEST Install Date : 2017-06-05T07:15:52 CEST Install Reason : Explicitly installed Install Script : Yes Validated By : Signature

so, to your question about version: yes, i believe so.

Thanks for your feedback!

The error message appears to be coming from the snap-confine part of snapd, it is slightly different from the one you posted cannot locate the core snap (note the extra the). I assume it is still the one you are seeing?

Could you please paste the output of the following commands?

$ snap changes
$ ls -ld /{var/lib/snapd/snap},snap}/{core,ubuntu-core}/*

Snap-confine expects to find some data in /snap/core/current (usually) which appears to be not there for some reason. So we need to find out why its not there and what is there instead :slight_smile:

No changes there, no, same error as before :slight_smile:

$ snap changes ID Status Spawn Ready Summary 9 Done 2017-06-05T20:05:04Z 2017-06-05T20:05:15Z Auto-refresh snap "core"

and

ls -ld /{var/lib/snapd/snap},snap}/{core,ubuntu-core}/* ls: cannot access '/var/lib/snapd/snap}/core/*': No such file or directory ls: cannot access '/var/lib/snapd/snap}/ubuntu-core/*': No such file or directory ls: cannot access '/snap/ubuntu-core/*': No such file or directory drwxr-xr-x 24 root root 321 Apr 11 14:28 /snap/core/1689 drwxr-xr-x 24 root root 321 Apr 28 08:51 /snap/core/1804 drwxr-xr-x 24 root root 321 Jun 1 20:30 /snap/core/2085 lrwxrwxrwx 1 root root 4 Jun 5 22:05 /snap/core/current -> 2085

Anything further to add? anything else i can do to troublesoot?

Yup, double checked, made sure the daemon was running, even tried re-installing and it still shows ‘unknown’.

[alan@manjaro ~]$ pacman -Q snapd
snapd 2.25-1
[alan@manjaro ~]$ snap version
snap     unknown
snapd    unknown
series   16
manjaro  unknown
kernel   4.9.30-1-MANJARO
[alan@manjaro ~]$ sudo pacman -S snapd
[sudo] password for alan: 
warning: snapd-2.25-1 is up to date -- reinstalling
resolving dependencies...
looking for conflicting packages...

Packages (1) snapd-2.25-1

Total Installed Size:  26.50 MiB
Net Upgrade Size:       0.00 MiB

:: Proceed with installation? [Y/n] 
(1/1) checking keys in keyring                                               [###########################################] 100%
(1/1) checking package integrity                                             [###########################################] 100%
(1/1) loading package files                                                  [###########################################] 100%
(1/1) checking for file conflicts                                            [###########################################] 100%
(1/1) checking available disk space                                          [###########################################] 100%
:: Processing package changes...
(1/1) reinstalling snapd                                                     [###########################################] 100%
:: Running post-transaction hooks...
(1/1) Arming ConditionNeedsUpdate...
[alan@manjaro ~]$ snap version
snap     unknown
snapd    unknown
series   16
manjaro  unknown
kernel   4.9.30-1-MANJARO
[alan@manjaro ~]$ systemctl start snapd
[alan@manjaro ~]$ snap version
snap     unknown
snapd    unknown
series   16
manjaro  unknown
kernel   4.9.30-1-MANJARO

The package build script needs to be updated. I think this is something @morphis could look at

You have something specific in mind? The package is at 2.26 so fairly recent.

What I spot from a first look is that is missed certain things like snap-discard-ns etc. See https://git.archlinux.org/svntogit/community.git/tree/trunk/PKGBUILD?h=packages/snapd#n47

Well, the smoking gun is the lack of version information. I bet the way we do things needs to be cross-checked with other distributions. We don’t install snapctl, snap-update-ns and snap-discard-ns. That’s a lot of things missing from a functional system. I could look deeper and I suspect that apps-bin-path.sh probably diverged from similar scripts that we use in other distributions. Tab completions and man pages are probably also missing. The void directory is gone, etc.

I think we need to boot up arch and iterate until the list of files in this and the debian package is roughly the same.

1 Like

Need to see when I get time for that but added on the list. Mailed Timothy again as he didn’t replied to my last mails yet.

1 Like