I'm using FreeBSD 12-CURRENT and recently I tried to update my packages with pkg
.
pkg update
finished successfully, but pkg upgrade
returned the following error:
Shared object "libarchive.so.5" not found, required by "pkg"
What should I do?
I'm using FreeBSD 12-CURRENT and recently I tried to update my packages with pkg
.
pkg update
finished successfully, but pkg upgrade
returned the following error:
Shared object "libarchive.so.5" not found, required by "pkg"
What should I do?
First of all, try pkg bootstrap -f
(or pkg install -f pkg
).
If it fails then try pkg-static bootstrap -f
(or pkg-static install -f pkg
) as it doesn't require any shared objects.
If everything else doesn't work then you can install pkg
from ports:
cd /usr/ports/ports-mgmt/pkg
make
make reinstall clean
You should be able to use pkg
now.
Also, remember that there are two programs called pkg
in FreeBSD. See man 7 pkg
and man 8 pkg
for more details.
Related: