Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

macos

raku

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)
like image 381
Mikhail Khorkov Avatar asked Oct 22 '21 05:10

Mikhail Khorkov


People also ask

How to fix dyld library not loaded error on Mac?

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.

What is Libarchive?

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

How to add LD_LIBRARY_PATH in Ubuntu?

/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.

How do I report an issue in Libarchive?

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)


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/
like image 111
Mikhail Khorkov Avatar answered Oct 19 '22 21:10

Mikhail Khorkov