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)
How to Fix ‘Dyld: Library not Loaded’ Error on MacOS. If the issue is with your Computer or a Laptop you should try using Reimage Plus which can scan the repositories and replace corrupt and missing files. This works in most cases, where the issue is originated due to a system corruption.
libarchive Multi-format archive and compression library The source distribution includes the libarchive library, the bsdtar and bsdcpio command-line programs, full test suite, and documentation. Stable release: 3.5.2(Aug 23, 2021) tar.xztar.gzzipwin64-binary
/usr/local/lib is not in the default Ubuntu path. You should add it at the end of the LD_LIBRARY_PATH environment variable in /etc/environment. Reboot and the new path will be effective.
The issue tracker for libarchive is hosted on GitHub. To report a general issue, use the issue tracker. For pull requests, use GitHub's pull request feature. Contiuous Build GitHub Actions(Ubuntu, macOS, Windows)
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/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With