/snap/lxd/***/snap/hooks/configure: snapctl: not found

Hello.

snap --version snap 2.44.3.r1450.g4ead117134-1 snapd 2.44.3.r1450.g4ead117134-1 series 16 arch - kernel 5.2.11-arch1-1-ARCH

snap install hello-world

works flawlessly, but when i try to install latest lxd i receive this errors:

Apr 22 20:49:13 fallback-os systemd[1]: Listening on Socket unix for snap application lxd.daemon. Apr 22 20:49:13 fallback-os systemd[1]: Starting Service for snap application lxd.activate… Apr 22 20:49:14 fallback-os lxd.activate[3074]: => Starting LXD activation Apr 22 20:49:14 fallback-os lxd.activate[3074]: ==> Creating missing snap configuration Apr 22 20:49:14 fallback-os lxd.activate[3074]: /snap/lxd/14804/snap/hooks/configure: 46: /snap/lxd/14804/snap/hooks/configure: snapctl: not found Apr 22 20:49:14 fallback-os lxd.activate[3074]: /snap/lxd/14804/snap/hooks/configure: 47: /snap/lxd/14804/snap/hooks/configure: snapctl: not found Apr 22 20:49:14 fallback-os lxd.activate[3074]: /snap/lxd/14804/snap/hooks/configure: 48: /snap/lxd/14804/snap/hooks/configure: snapctl: not found Apr 22 20:49:14 fallback-os lxd.activate[3074]: /snap/lxd/14804/snap/hooks/configure: 49: /snap/lxd/14804/snap/hooks/configure: snapctl: not found

However if i choose another version of lxd, say 3.0 and try to install it, then install succeeds:

sudo snap install lxd --channel=3.0

snap info lxd name: lxd summary: System container manager and API publisher: Canonical✓ store-url: https://snapcraft.io/lxd contact: Issues · lxc/incus · GitHub license: unset … commands: - lxd.benchmark - lxd.buginfo - lxd.check-kernel - lxd.lxc - lxd - lxd.migrate services: lxd.activate: oneshot, enabled, inactive lxd.daemon: simple, enabled, inactive snap-id: J60k4JY0HppjwOjW8dZdYc8obXKxujRu tracking: 3.0/stable refresh-date: today at 20:51 EEST …

Previously i had no problems with version 4.0.0 (14503), but when i tried to update it i received the same error listed here.

I thought that snap is broken so reinstalled it. I have deleted all snapd folders, like tutorials shows. And made a clean install of snapd from git via yay.

Is this Arch? Can you run ldd /usr/lib/snapd/snapctl and post the output?

That’s right.

uname -a Linux fallback-os 5.2.11-arch1-1-ARCH #1 SMP PREEMPT Thu Aug 29 08:09:36 UTC 2019 x86_64 GNU/Linux

[colt@fallback-os ~]$ ldd /usr/lib/snapd/snapctl ldd: /usr/lib/snapd/snapctl: No such file or directory [colt@fallback-os ~]$ which snapctl /usr/bin/snapctl [colt@fallback-os ~]$ ldd /usr/bin/snapctl linux-vdso.so.1 (0x00007fff1ff55000) libpthread.so.0 => /usr/lib/libpthread.so.0 (0x00007ff29277a000) libc.so.6 => /usr/lib/libc.so.6 (0x00007ff2925b7000) /lib64/ld-linux-x86-64.so.2 => /usr/lib64/ld-linux-x86-64.so.2 (0x00007ff2933b6000) [colt@fallback-os ~]$ ls -la /usr/bin/snapctl -rwxr-xr-x 1 root root 15496392 Apr 22 20:04 /usr/bin/snapctl I suppose it’s not good?

snap list --all Name Version Rev Tracking Publisher Notes core 16-2.44.3 9066 latest/stable canonical✓ core core18 20200311 1705 latest/stable canonical✓ base lxd 3.23 14133 3.23/stable canonical✓ - snapd 2.44.3 7264 latest/stable canonical✓ snapd

Also, where does the package come from?

I suspect you’re using snapd-git from AUR, which you shouldn’t really, snapd is what closely tracks the releases. I’ve pushed some updates to snapd-git which were missing and could potentially have caused an issue that you saw.

Still I strongly suggest you use snapd package instead. Word of warning, when switching from snapd-git to snapd, the packages are marked as conflicting, so pacman will remove snapd-git along with all the data from snaps.

You are right, i’ve used snapd-git, but with the thought that it closely tracks latest releases instead. Arch wiki doesn’t answer on this question, but snapd-git aur page has comment with recommendation to use snapd:

bboozzoo commented on 2019-11-27 16:41 @rodneyck snapd-git builds directly from master, so there can be an occasional hiccup, once interfaces: remove leftover reservedForOS by mvo5 · Pull Request #7809 · canonical/snapd · GitHub lands, things should be back to normal.

I’d recommend installing snapd for regular use.

Ok, thank you. I’ll then move to snapd and post an update how it went.

AFAK *-git are usually built directly from git repos of respective upstreams. I’ve pinned a comment under snapd-git mentioning that snapd should be used instead and dropped snapd-git from the archwiki page.

@mborzecki thank you for your support, after moving to snapd everything is working.

$ snap version

snap 2.44.3-1 snapd 2.44.3-1 series 16 arch - kernel 5.2.11-arch1-1-ARCH

$ snap list

Name Version Rev Tracking Publisher Notes core18 20200311 1705 latest/stable canonical✓ base lxd 4.0.1 14804 latest/stable canonical✓ - snapd 2.44.3 7264 latest/stable canonical✓ snapd

$ snap changes ID Status Spawn Ready Summary 1 Done today at 18:25 EEST today at 18:25 EEST Initialize system state 2 Done today at 18:26 EEST today at 18:27 EEST Install “core18” snap 3 Done today at 18:26 EEST today at 18:26 EEST Initialize device 4 Done today at 18:28 EEST today at 18:29 EEST Install “snapd” snap 5 Done today at 18:31 EEST today at 18:32 EEST Install “lxd” snap

$ which snapctl /usr/bin/snapctl $ ls -la /usr/bin/snapctl lrwxrwxrwx 1 root root 22 Apr 23 18:18 /usr/bin/snapctl → /usr/lib/snapd/snapctl $ ldd /usr/lib/snapd/snapctl not a dynamic executable