4

I just updated my FreeBSD from 9.x to 10.0 (using freebsd-update) and now my pkg isn't working.

# pkg
Shared object "libarchive.so.5" not found, required by "pkg"
#

I know I can use pkg-static meanwhile, but how do I fix my pkg now?

* UPDATE *:

# pkg-static  info pkg
pkg-static: No package(s) matching pkg
# pkg-static install pkg
Updating repository catalogue
pkg-static: http://pkg.freebsd.org/freebsd:10:x86:64/latest/repo.txz: Not Found
# 
alexus
  • 13,374

2 Answers2

4

Here's what fixed my FreeBSD 9.2-RELEASE -> 10.0-RELEASE update which had the identical issue Shared object "libarchive.so.5" not found required by "pkg", though my pkg-static pkg showed 1.2.6 was installed.

# pkg-static bootstrap -f

Which listed instructions for boot strapping pkg

# pkg-static delete -f pkg
# /usr/sbin/pkg -v

Afterwards pkg seems to behave correctly.

1

Options:

  1. Rebuild pkg from ports:

    cd /usr/ports/ports-mgmt/pkg && make deinstall reinstall clean
    
  2. Fix the library link via libmap.conf:

    echo "libarchive.so.5 `ls /usr/lib/libarchive.so.*`" >> /etc/libmap.conf
    

    There might be other apps that this fixes the same issue. pkg also relies on 8 other shared libraries. I'm not sure which changed between 9.x and 10.x, but I'd bet there will be others.

Chris S
  • 78,185