Re: Stuff Not Working after Upgrade - Missing Dependency

From: Dan Mahoney (Ports) <freebsd_at_gushi.org>
Date: Tue, 18 Feb 2025 09:29:40 UTC

> On Feb 17, 2025, at 18:35, Vincent Sabio <vince-2.0@vjs.org> wrote:
> 
> On Mon, 17 Feb 2025 17:54:01 -0800, Steve Rikli wrote:
>> On Mon, Feb 17, 2025 at 08:28:59PM -0500, Vincent Sabio wrote:
>>> On Mon, 17 Feb 2025 23:42:43 +0000, Frank Leonhardt wrote:
>>>> On 17/02/2025 23:07, Vincent Sabio wrote:
>>> 
>>>>> I just upgraded my server from 12.0-REL to 14.1-REL (yeah, I know) 
>>>>> (I'm still running CentOS, too), and now PHP refuses to run. Typing 
>>>>> php at the command line gives me:
>>>>> 
>>>>>   ld-elf.so.1: Shared object "libdl.so.1" not found, required by 
>>>>> "libxml2.so.2"
>>>> 
>>>> I had hell when I went from 12 to 14 (via 13) on a workshop machine 
>>>> (my gateway), so I just don't do it on anything "production". I spent 
>>>> six months on and off, fiddling with it to try and see if there was 
>>>> some cure by hand-fixing dependencies. At the weekend I gave up, 
>>>> flattened it and installed everything from scratch.
>>> 
>>> I'm dreading having to go that route; it's a highly customized 
>>> config, including several RAIDs
> 
> I should hove noted -- SoftRAIDs.
> 
>>> Is it possible to get a copy of libdl.so.1 and install it in 
>>> /usr/local/lib/ ?
>> 
>> I've had to do something like that in the past to pull a machine back
>> in from the weeds, e.g. copy a missing library from backups and temporarily
>> copy it back onto the sysdisk so I had enough working tools to do a proper
>> upgrade routine.

Nothing in /usr/local/lib should be required to do an upgrade.  Everything in /usr/local/* comes from pkg.

> 
> I upgraded from 12.0 directly to 14.0 and then 14.1. The file was missing as of 14.0 -- and I had hoped that upgrading to 14.1 would fix it, but of course it did not.

Gods, don't do this.

Do yourself a favor and stop off at each major release.  I've been using freebsd-update since 7.3, and I've seen some crazy things happen.  I know the people who made freebsd-update are not testing use-cases where it involves leapfrogging over a full major release.

This would be an example of that.  I really wish it kept a logfile of what it did and changed.

You could always grab yourself a copy of base.txz out of the mirrors and untar it and get whatever you need out of it.  That's the same file the installer pulls down.  The statically-linked files in /rescue may be of help in doing so if /usr/bin/tar don't want to play ball.

One of the issues I've found with freebsd-update IDS is it will warn you about changed files, files with the wrong checksum, files with the wrong permissions, but *not* missing files.  It may be worthwhile to untar *all* of base.txz somewhere and do a comparison.

-Dan