pkg killed on FreeBSD upgrade to 14

161 views
Skip to first unread message

Frank Leonhardt

unread,
Dec 8, 2023, 1:43:40 PM12/8/23
to freebsd-...@freebsd.org
I'm not sure whether this is a question or a warning.

I upgraded my "latest" FreeBSD box to 14.0-RELEASE. It basically runs
local DNS and a DHCP server so it's not a huge deal if it's trashed, and
is therefore the first to get upgraded. It was originally installed with
12.0 and has been updated to everything in between.

I got "bad vibes" going to from 13.2->14.0 - warnings that seemed
reasonable about stuff missing from /src/ and suchlike that I didn't
expect to see, but no actual errors as far as I could tell.

On completion, however, pkg was no longer working - the following error
message:

'ld-elf.so.1: Shared object "libssl.so.111" not found, required by "pkg"'

My suspicion is that this was something to do with OpenSSL being updated
in 14.0 but I decided I'd had enough and did a (successful) rollback
rather than trying to figure it out and relinking libraries.

Has anyone else had the same problem, and what are the runes to avoid it
should I decide to have another go?

Thanks, Frank.



rob...@rrbrussell.com

unread,
Dec 8, 2023, 2:22:28 PM12/8/23
to freebsd-...@freebsd.org
pkg-static bootstrap -f will force an upgrade of pkg from the package repository. After that several rounds of portmaster -af should find all the breakages.

I have found poudrière to be more reliable at rebuilding everything than portmaster.

Frank Leonhardt

unread,
Dec 8, 2023, 5:25:30 PM12/8/23
to ques...@freebsd.org
On 08/12/2023 19:21, rob...@rrbrussell.com wrote:
On Fri, Dec 8, 2023, at 12:43, Frank Leonhardt wrote:
<snip>
I got "bad vibes" going to from 13.2->14.0 - warnings that seemed 
reasonable about stuff missing from /src/ and suchlike that I didn't 
expect to see, but no actual errors as far as I could tell.

On completion, however, pkg was no longer working - the following error 
message:

'ld-elf.so.1: Shared object "libssl.so.111" not found, required by "pkg"'
<snip>

Has anyone else had the same problem, and what are the runes to avoid it 
should I decide to have another go?
<snip>
pkg-static bootstrap -f will force an upgrade of pkg from the package repository. After that several rounds of portmaster -af should find all the breakages.

I have found poudrière to be more reliable at rebuilding everything than portmaster.

Thanks - I could could find an install the relevant library manually, but I want to know *why* a standard upgrade on a vanilla installation broke. Are there any undocumented pre-upgrade steps. Good idea to use pkg-static to recover pkg, but I took this as a bad sign and did a rollback. I suspect there was more than just this wonky about it. The certificate login was also broken, and I'm sure csh being swapped out would cause trouble too :-(

Pete Wright

unread,
Dec 8, 2023, 5:47:23 PM12/8/23
to ques...@freebsd.org
It's standard practice to upgrade pkg itself before updating any other
packages when doing any major updates to a freebsd release.

The docs may need to be clarified around this, but the standard
operating procedure IMHO is after you've updated your kernel and
userland with a new major version the first step is to "pkg-static
upgrade" which should make sure all of the correct libraries for pkg are
in place.


-pete


--
Pete Wright
pe...@nomadlogic.org

Dewayne Geraghty

unread,
Dec 11, 2023, 2:55:03 AM12/11/23
to ques...@freebsd.org, freeb...@fjl.co.uk

Frank,

I avoid major version upgrades and performed a fresh 14.0 install.  Then attempted to git clone releng/14.0 due to the errata notices.  Unfortunately neither git (GPLv2) nor got (ISCL) are included.  So, like curl and fetch, I set the environment variables HTTPS_PROXY and HTTP_PROXY and attempted to use pkg.   Only much later did I realise (man pkg.conf Examples) that I needed to set these variables somewhere within pkg.conf. ie pkg didn't fail so we can compare.

Anyway to your specifics.  My FreeBSD14.0R install has
/usr/lib/libssl.so.30
while my BSD 13.2S has
/usr/lib/libssl.so.111

I strongly suspect that either your upgrade has become muddled or you're using the ports version of pkg.  Check your search path for pkg with 

which pkg
it should return
/usr/sbin/pkg
if it returns /usr/local/sbin/pkg then you are using the ports software, which remains linked to libssl.so.111.  The other clue is that pkg-static isn't in the base FreeBSD14.0 :)

Aside: I can't speak for poudriere being more reliable as portmaster has serverd me very well, but I value predictability and simplicity ;)

Frank Leonhardt

unread,
Dec 20, 2023, 11:02:53 AM12/20/23
to ques...@freebsd.org
On 08/12/2023 22:46, Pete Wright wrote:
> The docs may need to be clarified around this, but the standard
> operating procedure IMHO is after you've updated your kernel and
> userland with a new major version the first step is to "pkg-static
> upgrade" which should make sure all of the correct libraries for pkg
> are in place.

Thanks - either I missed it in the manual or, as you say, probably needs
to be added.




Reply all
Reply to author
Forward
0 new messages