Re: Stuff Not Working after Upgrade - Missing Dependency

From: Paul Procacci <pprocacci_at_gmail.com>
Date: Tue, 18 Feb 2025 00:27:07 UTC
On Mon, Feb 17, 2025 at 6:48 PM Frank Leonhardt <freebsd-doc@fjl.co.uk> wrote:
>
> On 17/02/2025 23:43, Frank Leonhardt wrote:
> > On 17/02/2025 23:07, Vincent Sabio wrote:
> >> Hi folks,
> >>
> >> 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"
> >>
> >> But this goes way beyond just php -- I get the same thing with dig,
> >> when trying to start named, etc.
> >>
> >> I've been pulling my hair out, trying updates and downgrades and
> >> side-parries and allkindsashit and I can't figure out how to fix this.
> >>
> >> Any help appreciated -- thanks!
> >>
> >> (Also didn't know which is the correct list for this issue, so
> >> figured I'd start here.)
> >>
> >>
> >> - V
> >
> > This list is as good as any.
> >
> > 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.
> >
> > The problem with the shared objects is some of the packages don't
> > appreciate having the upgraded versions, so basically you've got to
> > upgrade (or reinstall) all the packages too - assuming you're using
> > packages. This is easier said than done, and inevitably you'll find a
> > package that doesn't have an upgrade anyway. I'm sure there's someone
> > hereabouts that'll have the binary upgrades working fine, but IME they
> > work between minor versions, and between one major version and the
> > next, but not across two major versions - and that includes if you
> > upgrade to the intermediate major version first. This is just my
> > rule-of-thumb.
> >
> > One approach that does work for me is to run the old environment in a
> > jail on the newer OS, and that's what I do now instead of trying an
> > in-place upgrade. Of course you can only do this if you have a backup
> > of the original. I always run "zfs snap -r" before an upgrade ;-)
> >
> > Good luck!
> >
> Forgot to mention that "pkg upgrade" or "pkg-static upgrade" is the
> command you want to try running to actually upgrade the packages.
>
>
>
>

The alternative to this which I *do not* suggest is fiddling with
libmap.conf mapping older shared libs to newer.
It works often enough when in a bind, but truly the pkg-static
approach as mentioned by Frank is the more appropriate approach.

~Paul

-- 
__________________

:(){ :|:& };: