Chicken/egg problem with pkg

Greg Byshenk freebsd at byshenk.net
Fri Mar 10 20:26:28 UTC 2017


On Fri, Mar 10, 2017 at 02:57:32PM +0100, Jan Bramkamp wrote:
> On 10/03/2017 14:47, Guido Falsi wrote:
> > On 03/10/17 14:26, Hans de Hartog wrote:

> >> I have an old web server (10.1-RELEASE-p9) which is running for years
> >> without any upgrades. Now I want to install a simple port (trafshow, to
> >> see what's going on).
> >>
> >> It first want to upgrade pkg from 1.5.1 to 1.10.0_2 but that doesn't
> >> work:
> >>
> >> [1/1] Upgrading pkg from 1.5.1 to 1.10.0_2...
> >> [1/1] Extracting pkg-1.10.0_2: 100%
> >> /usr/local/lib/libpkg.so.4: Undefined symbol "openat"
> >>
> >> Anything I try to do with pkg now gives me this error-message.
> >>
> >> /var/log/messages says: pkg: pkg upgraded: 1.5.1 -> 1.10.0_2
> >>
> >> How do I proceed from here (without upgrading everything, please)?
> >
> > Have you tried using the "pkg-static" command? It's the same as pkg, but
> > statically linked, should sidestep your issue.
> 
> The old pkg-static might work, but it would wreck his system because he 
> uses a repo with an ABI unsupported by his base + kernel system. He is 
> lucky he immediately triggered the incompatibility.

Will pkg-static install an old version of pkg?

One option might be to check if the old version of pkg is in
/var/cache/pkg, then maybe pkg-static could be used to 
reinstall the old version.

Alternatively, if ports are installed, one could rebuild the
old version of pkg from the port. Or even download the 
appropriate old ports tree to be able to build the old pkg.
That would also enable building an old(?) version of trafshow.

But I agree with others that the right answer is to upgrade the
system. Running old systems facing the Internet is a bad idea.


-- 
greg byshenk  -  gbyshenk at byshenk.net  -  Leiden, NL


More information about the freebsd-ports mailing list