After Upgrade to 8.1 unable to run pkg_add and other stuff

I did an upgrade from 7.3 to 8.1 using the FreeBSD-update utility. When I tried to rebuild the ruby port as shown in the FreeBSD handbook I receive an error:
Code:
libcrypt.so.4 not found.

If I try to use pkg_add I get libfetxh.so.5 not found.

I also tried downloading all sources and ran make buildworld and make buildkernel etc... with the same results.
 
After you upgrade major versions of the OS (7.x to 8.x), it's required to rebuild all ports. Install ports-mgmt/portmaster. There's a procedure at the end of the man page for automating that reinstall of all ports.
 
Problem is I can't even install ports:

Code:
===>  Checking if ports-mgmt/portmaster already installed
/libexec/ld-elf.so.1: Shared object "libfetch.so.5" not found, required by "pkg_info"
*** Error code 1

Stop in /usr/ports/ports-mgmt/portmaster.
*** Error code 1

Stop in /usr/ports/ports-mgmt/portmaster.
 
If I run:

Code:
saturn# ldd /usr/sbin/pkg_add

I get

Code:
/usr/sbin/pkg_add:
        libfetch.so.6 => /usr/lib/libfetch.so.6 (0x280a3000)
        libmd.so.5 => /lib/libmd.so.5 (0x280b2000)
        libutil.so.8 => /lib/libutil.so.8 (0x280c2000)
        libssl.so.6 => /usr/lib/libssl.so.6 (0x280d1000)
        libcrypto.so.6 => /lib/libcrypto.so.6 (0x28119000)
        libc.so.7 => /lib/libc.so.7 (0x28274000)

I do not understand why pkg_add is looking for libfetch.so.5 instead of libfetch.so.6?
 
Code:
/usr/sbin/pkg_info:
        libfetch.so.6 => /usr/lib/libfetch.so.6 (0x280a0000)
        libmd.so.5 => /lib/libmd.so.5 (0x280af000)
        libutil.so.8 => /lib/libutil.so.8 (0x280bf000)
        libssl.so.6 => /usr/lib/libssl.so.6 (0x280ce000)
        libcrypto.so.6 => /lib/libcrypto.so.6 (0x28116000)
        libc.so.7 => /lib/libc.so.7 (0x28271000)
 
I was able to get back a functional system (allowing me to rebuild ports, etc...) by adding the following to /etc/libmap.conf

Code:
libfetch.so.5		libfetch.so.6
libmd.so.4	libmd.so.5
libutil.so.7	libutil.so.8
libcrypt.so.4	libcrypt.so.5
libreadline.so.7	libreadline.so.8
libncursesw.so.7	libncursesw.so.8
libz.so.4	libz.so.5
libpam.so.4	libpam.so.5

What does this mean? Do I need to run /sbin/ldconfig?
If I remove those entries does everything break again?
 
It's still broken, using libmap just substitutes old versions of libraries for the newer ones. Don't forget to remove those entries after you've rebuilt all the ports.
 
Back
Top