NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[nagelbh%sdf.org@localhost: Re: /usr/pkg/lib/libgobject-2.0.so.8: Shared object "libffi.so.8" not found]



----- Forwarded message from Bruce Nagel <nagelbh%sdf.org@localhost> -----


Date: Sun, 6 Mar 2022 16:52:22 +0000
From: Bruce Nagel <nagelbh%sdf.org@localhost>
To: Greg Troxel <gdt%lexort.com@localhost>
Subject: Re: /usr/pkg/lib/libgobject-2.0.so.8: Shared object "libffi.so.8" not found

On Sun, Mar 06, 2022 at 08:44:18AM -0500, Greg Troxel wrote:

Bruce Nagel <nagelbh%sdf.org@localhost> writes:

> I'm running NetBSD 9.0 on amd64.

What its the path in /usr/pkg/etc/pkgin/repositories.conf

http://ftp.netbsd.org/pub/pkgsrc/packages/NetBSD/amd64/9.0/All/

> I have tried: pkgin install libffi
> > It indicates that it's installing libffi-3.4.2nb1 and gives no errors or
> warnings.
> > After doing that I don't see a copy of libffi.so.8 in /usr/pkg/lib.

I am using binary packages I built myself, but my libffi has that

$ pkg_info -L libffi
Information for libffi-3.4.2nb2:

Files:
/usr/pkg/include/ffi.h
/usr/pkg/include/ffitarget.h
/usr/pkg/info/libffi.info
/usr/pkg/lib/libffi.la
/usr/pkg/lib/libffi.a
/usr/pkg/lib/libffi.so
/usr/pkg/lib/libffi.so.8
/usr/pkg/lib/libffi.so.8.1.0
/usr/pkg/lib/pkgconfig/libffi.pc
/usr/pkg/man/man3/ffi.3
/usr/pkg/man/man3/ffi_call.3
/usr/pkg/man/man3/ffi_prep_cif.3
/usr/pkg/man/man3/ffi_prep_cif_var.3

lrwxr-xr-x  1 root  wheel     15 Jan 10 09:47 /usr/pkg/lib/libffi.so.8 -> libffi.so.8.1.0
-rwxr-xr-x  1 root  wheel  26120 Jan 10 09:47 /usr/pkg/lib/libffi.so.8.1.0

I get:    pkg_info: can't find package 'libffi'

> When I try: pkgin remove libffi
> > It indicates that there is "no such installed package libffi"

Probably you have a mix of two PKG_DBDIR locations in /var/db/pkg and /usr/pkg/pkgdb.

I didn't change the location, but I wrote up instructions and a script
of how to deal with it.

http://pkgsrc.org/pkgdb-change/


I strongly recommend setting PKG_DBDIR in all 3 places, under manual, no
matter what else you do.  First you need to figure out where your pkgdb
is, and if two how to merge it.

Looking through the 'pkgdb-change' page, I'm missing 2 of the 3 files

/etc/mk.conf has:
PKG_DBDIR=/var/db/pkg

so that line just needs to be changed to:
PKG_DBDIR=/usr/pkg/pkgdb

I have no /etc/pkg_install.conf file or /usr/pkg/etc/pkg_install.conf -
should I create them and just include PKG_DBDIR=/usr/pkg/pkgdb in them?
Or do I need to do something more (is there other content needed in
those files)?



> Any ideas on how I can resolve this?
> > Would it be a bad idea to try to compile and install libffi locally from
> /usr/pkgsrc/devel?

no but I am guessing that is not your problem.

> It seems like pkgin itself is having issues, is there something I can do
> to troubleshoot that?
> > Should I risk trying to upgrade pkgin (using pkgin or compiling in
> /usr/pkgsrc)?
> > > In the bigger picture, how do I avoid getting into this situation in the
> future, just avoid pkgin?  What are the good alternatives?

The pkgdb change is a one-time issue.


Per your other email, results of these are:

pkg_admin check:   pkg_admin can't open
/var/db/pkg/gdk-pixbuf2-2.40.0nb2/+CONTENTS: No such file or directory

pkg_admin rebuild-tree:   pkg_admin: Cannot read +CONTENTS of package
gdk-pixbuf2-2.40.0nb2


_NetBSD-pkgdb check found:  FATAL: TWO copies of PKG_DBDIR found

So it's definitely the split-brain package databases problem.


/usr/sbin/pkg_add -V gives:   20191008

/usr/sbin/pkg/pkg_add -V gives:   20210308

Do I need to fix anything there?


Thank you, both for putting the script together and for helping me sort
this out.

Bruce
--
People shouldn't be afraid of their government.  Governments should be afraid of
their people.
(Alan Moore)

----- End forwarded message -----

--
At the end of the game, the king and the pawn go back in the same box.
(Italian Proverb)



Home | Main Index | Thread Index | Old Index