Skip to content

Instantly share code, notes, and snippets.

@ryderstorm
Last active March 27, 2023 18:55
Show Gist options
  • Save ryderstorm/b927d9f59ea5a8325a5dfb422d1354a3 to your computer and use it in GitHub Desktop.
Save ryderstorm/b927d9f59ea5a8325a5dfb422d1354a3 to your computer and use it in GitHub Desktop.
Installing snap on Arch

I got an error when following the instructions to install snap on Arch Linux from https://snapcraft.io/install/multipass/arch#install

└─> makepkg -si
==> Making package: snapd 2.58.3-1 (Mon 27 Mar 2023 10:28:32 AM EDT)
==> Checking runtime dependencies...
==> Checking buildtime dependencies...
==> Retrieving sources...
  -> Found snapd-2.58.3.tar.xz
==> Validating source files with sha256sums...
    snapd-2.58.3.tar.xz ... Passed
==> Extracting sources...
  -> Extracting snapd-2.58.3.tar.xz with bsdtar
==> Starting prepare()...
==> Removing existing $pkgdir/ directory...
==> Starting build()...
*** Setting version to '2.58.3-1' from user.
go build github.com/seccomp/libseccomp-golang:
# pkg-config --cflags  -- libseccomp
Package libseccomp was not found in the pkg-config search path.
Perhaps you should add the directory containing `libseccomp.pc'
to the PKG_CONFIG_PATH environment variable
No package 'libseccomp' found
pkg-config: exit status 1
==> ERROR: A failure occurred in build().
    Aborting...

libseccomp was installed on my system:

└─> pacman -Q libseccomp
libseccomp 2.5.4-1

But it wasn't under under PKG_CONFIG_PATH, which was set to /opt/local/lib/pkgconfig.

└─> ls -Alh /opt/local/lib
ls: cannot access '/opt/local/lib': No such file or directory

It was under /usr/lib/pkgconfig:

└─> ls /usr/lib/pkgconfig/ | grep libseccomp
.rw-r--r-- root root 1009 B  Fri Apr 22 01:56:45 2022 libseccomp.pc

So I used a custom PKG_CONFIG_PATH with the makepkg command:

PKG_CONFIG_PATH=/usr/lib/pkgconfig makepkg -si

And the command ran successfully

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment