Solved 12.0-BETA2 pkg broken (libssl.so.9 instead of libssl.so.111) linked

I haven't observed this while upgrading some systems via buildworld. However, while working on a new script to manage jails and trying out 12.0-BETA2 i encountered that pkg fails to bootstrap:

Code:
root@jail12:/ # pkg
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/FreeBSD:12:amd64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
[jail12] Installing pkg-1.10.5_4...
[jail12] Extracting pkg-1.10.5_4: 100%
ld-elf.so.1: Shared object "libssl.so.9" not found, required by "pkg"

I have downloaded the base.txz e15094670a5196941dd8e67b23685625ab1f3b4ed6a1afe991353b9e491dab04 from /pub/FreeBSD/releases/amd64/12.0-BETA2/

Examing the binary:

Code:
/usr/sbin/pkg:
[...]
    libssl.so.111 => /usr/lib/libssl.so.111

looks correctly linked on a first look which confused me for a second, however pkg is loading libpkg and that's what seems to be incorrectly linked:

Code:
# ldd /usr/local/lib/libpkg.so.4.0.0

/usr/local/lib/libpkg.so.4.0.0:
    libutil.so.9 => /lib/libutil.so.9 (0x800663000)
    libssl.so.9 => not found (0)
    libcrypto.so.9 => not found (0)


I wonder if more have observed the same and what would be the correct place to submit an issue, as I consider pkg an essential part of the base.
 
Have you guys tried playing with pkg-static? Its the statically linked binary of pkg which will keep working even when shared libraries are getting a bit fuzzy. I think I fixed it by building pkg from ports for the time being. There are also some work-arounds that say "install openssl111-1.1.1_1 with pkg-static and manually link the shared libraries".

As such, altough I'm not for this solution.
Code:
ln -sf /usr/local/lib/libcrypto.so /usr/local/lib/libcrypto.so.9

There have been a few discussions about this on the mailing lists. I advice both of you that if you run STABLE or anything non RELEASE you subscribe to the most common mailing lists.
 
-STABLE or even -CURRENT isn't supported here so lets focus on 12-BETA2. I was primary seeking for confirmation or if I have overseen something.
Symbol linking .so.9 could be risky - better rebuild pkg or use the static version:

Code:
pkg-static bootstrap -f

but looks like it got fixed now:

Code:
/usr/local/lib/libpkg.so.4.0.0:
    libutil.so.9 => /lib/libutil.so.9 (0x800663000)
    libssl.so.111 => /usr/lib/libssl.so.111 (0x80067a000)
    libcrypto.so.111 => /lib/libcrypto.so.111 (0x801038000)
    [...]

after reinstalling pkg all looks good
 
Last edited:
I ran into this too, and as it's an unimportant install, where I just wanted to see if there are any drastic changes, I used Duffyx's solution, symlinkinking so to so.9. (Not a solution I would advise, or even use if it were an install I was planning to keep).
 
Wouldn't it be safer to re-build from source?... That looks like a recipe for forgetting about the link and somehow 6 months down the road being stuck forgetting what happened and ending up in "library hell."
 
-STABLE or even -CURRENT isn't supported here so lets focus on 12-BETA2
-STABLE is supported. Note that 12.0-BETA2 is actually 12-STABLE at the moment. You are correct about -CURRENT (which is 13.0-CURRENT now).
 
:Let me emphasize, I just did the symlink from so to so.9 because I was trying it out and was in a hurry. Yeah, it strikes me as a recipe for disaster too. I'll be redoing the install once it hits RC.
 
I just posted in another thread marked SOLVED how libmap right after installing openssl111 fixed pkg... maybe that work work as a quicker alternative for the short term. [ neither threads I had otherwise participated in... ]
 
Well, just did a fresh install of BETA3 and the problem doesn't exist there. So, I guess I'm good. BETA3 install was very smooth, really doesn't seem like BETA, but this is a laptop just used for light testing and I haven't tried anything with it save basic browsing, mail, the usual.
(By mail I mean neomutt, not a server)
 
Well, just did a fresh install of BETA3 and the problem doesn't exist there.
This issue only happens when updating from BETA1 to BETA2 or BETA3 because BETA1 has OpenSSL 1.1.0 and BETA2 has 1.1.1. So packages built for BETA1 didn't work on BETA2 and vice versa due to the difference of the SSL library.
 
I thought the APLHA's were running very smooth until we hit the OpenSSL upgrade.
BETA3 seems very stable and I have it on a few boxes now.
 
I've been upgrading steadily from BETA1 to BETA3 on a few of my systems at home. Those used to run 11-STABLE and they've been switched to 12-STABLE. Besides that small inconvenience with OpenSSL they've been running quite nicely. I had some issues with several ports initially, those failed to build. But the number of build errors has been steadily decreasing, I'm positive they'll all be fixed when the -RELEASE is made.
 
Back
Top