Why does Pakku crash with 'Cannot locate native library libarchive.13.dylib' while using on MacOS Big Sur

Viewed 162

I'm using macOS Big Sur and trying to install Raku module like pakku add App::RaCoCo. I will get a message:

Cannot locate native library 'libarchive.13.dylib': dlopen(libarchive.13.dylib, 10): image not found

Environment:

> raku -v
Welcome to ™ v2021.09.
Implementing the ™ programming language v6.d.
Built on MoarVM version 2021.09.

Pakku> git show --pretty=reference --no-patch
09fb5c7 (Add missing space separator between `pakkuopt` in `help` command, 2021-04-17)
1 Answers

It happens because of the Archive::Libarchive::Raw module cannot find libarchive.13.dylib library in the default paths and crashes.

To fix it you need to install libarchive through brew and make a link for libarchive.13.dylib library:

brew install libarchive
ln -s /usr/local/opt/libarchive/lib/libarchive.13.dylib /usr/local/lib/
Related