pkg error after upgrading freebsd to release 12.0 p10

I am upgrading from release 11.2p4 (pkg 1.10.5_5) to 12.0 p10
I follow the instructions https://www.freebsd.org/releases/12.0R/installation.html
After the last "freebsd-update install" pkg doesn't work any more:
ld-elf.so.1: Shared object "libarchive.so.6" not found, required by "pkg"
I know this is a bug so i followed the instruction https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=239498
Code:
pkg-static install -f pkg
The error still occurs when running pkg (1.11.1).
When I run ldd
Code:
/usr/sbin/pkg:
        libarchive.so.7 => /usr/lib/libarchive.so.7 (0x80024d000)
        libfetch.so.6 => /usr/lib/libfetch.so.6 (0x80030f000)
        libprivateucl.so.1 => /usr/lib/libprivateucl.so.1 (0x800324000)
        libsbuf.so.6 => /lib/libsbuf.so.6 (0x800348000)
        libcrypto.so.111 => /lib/libcrypto.so.111 (0x80034e000)
        libssl.so.111 => /usr/lib/libssl.so.111 (0x80063b000)
        libc.so.7 => /lib/libc.so.7 (0x8006d0000)
        libz.so.6 => /lib/libz.so.6 (0x800ac3000)
        libbz2.so.4 => /usr/lib/libbz2.so.4 (0x800add000)
        liblzma.so.5 => /usr/lib/liblzma.so.5 (0x800af2000)
        libbsdxml.so.4 => /lib/libbsdxml.so.4 (0x800b1d000)
        libm.so.5 => /lib/libm.so.5 (0x800b49000)
        libthr.so.3 => /lib/libthr.so.3 (0x800b7b000)
The work around I found:
Code:
root@WEB1:/usr/lib # ln -s libarchive.so.7 libarchive.so.6
root@WEB1:/usr/lib # ln -s libssl.so.111 libssl.so.8
root@WEB1:/lib # ln -s libcrypto.so.111 libcrypto.so.8

But for me this is not the solution.
 
The work around I found:
Never, ever do this. It's never the right solution and it's going to haunt you later on, when you don't remember ever having done this. Remove them.

Because you did a major version upgrade you'll need to reinstall everything: pkg-static upgrade -f
 
After running
Code:
pkg-static upgrade -f
I still have the "libarchive.so.6 not found"

For your information I have a local repo-server with poudriere. But that server/jail/ports are up to date.
 
Did you switch to a 12.0-RELEASE jail to build your packages? I'm guessing you're installing 11.x packages on a 12.0-RELEASE machine.

You can, temporarily, fix things by installing misc/compat11x. Then you'll need to create a 12.0-RELEASE jail in Poudriere and rebuild everything for 12.0.
 
I have found the problem: the local repo file of the server was still pointing to the old url (release 11.2).
Thanks in advance.
 
Add a couple of symlinks in /usr/local/poudriere/data/packages:
Code:
root@molly:/usr/local/poudriere/data/packages # ll
total 57
drwxr-xr-x  4 root  wheel   5 Jul 27 15:40 113-release-desktop/
drwxr-xr-x  7 root  wheel  15 Sep  9 11:01 113-release-server/
drwxr-xr-x  7 root  wheel  15 Sep 14 22:11 12-stable-desktop/
drwxr-xr-x  7 root  wheel  15 Sep 15 21:54 12-stable-server/
drwxr-xr-x  7 root  wheel  15 Sep  9 00:03 120-release-desktop/
drwxr-xr-x  7 root  wheel  15 Sep  9 11:41 120-release-server/
lrwxr-xr-x  1 root  wheel  18 Sep 16 14:41 FreeBSD:11:amd64@ -> 113-release-server
lrwxr-xr-x  1 root  wheel  18 Sep 16 14:41 FreeBSD:12:amd64@ -> 120-release-server

You can then use the ${ABI} variable in your custom repo:
Code:
  url: "http://packages.example.com/packages/${ABI}"

This will automatically switch according to the version.
 
Back
Top