NetBSD-Users archive

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

Re: Libreoffice: Error about /usr/lib/libstdc++.so.7



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

> I confirmed that in the following files, PKG_DBDIR=/usr/pkg/pkgdb is the
> file path set:
>
>  /usr/pkg/etc/pkg_install.conf
>  /etc/mk.conf
>  /etc/pkg_install.conf

That sounds good then.  So you should have a package databsae in
/usr/pkg/pkgdb (meaning a bunch of dirs with things like +CONTENT in
them).  And `pkg_info` should list packages that correspond to those
dirs, more or less exactly.

And, /var/db/pkg should not exist.

> It does appear that pkgin is still putting info in /var/db/pkgin, because
> the cache, pkg_install-err.log, and pkgin.db files there have all been updated
> today (when I updated pkgin using pkgin):
>
>  contents of /var/db/pkgin:
>
>  drwxr-xr-x  2 root  wheel     23552 Aug  8 12:42 cache
>  -rw-r--r--  1 root  wheel   4959205 Aug  8 12:42 pkg_install-err.log
>  -rw-r--r--  1 root  wheel  35078144 Aug  8 12:42 pkgin.db
>
> So it appears pkgin is still writing to /var/db/pkgin for some reason, what
> config file controls that for pkgin?

That's fine.  That's the pkgin database, which is distinct from the
pkgdb.   pkgdb is about the base system (and updated via pkgsrc)
pkg_info, pkg_add, pkg_delete, etc.

pkgin is a program that calls these pkg_foo, and has an additional
databasee.

> The manpage for pkgin says:
>
>     /var/db/pkgin
>                    This directory contains the individual files and
>                    directories used by pkgin listed below.
>
> The version of pkgin I have installed is 22.10.0nb2, the most current showing
> on pkgsrc.org, so it should be putting things in /usr/pkg/pkgdb, correct?
>
> Maybe I missed something in https://www.pkgsrc.org/pkgdb-change/

Nope, that's not about pkgin at all.  I think your pkgdb setup is ok.

>>You may also want to update pkgin.   I have no idea how old your
>>installed packages are.   As I said before, having some packages old,and
>>especially very old, is asking for trouble because essentially nobody
>>who contributes to pkgsrc does is that way.
>
> My starting point on this system was a fresh NetBSD 9.3 install (in April).
>  I have now installed pkgin-22.10.0.nb2 (and with it pkgin also
> installed
> pkg_install-20211115).
>   'pkgin upgrade' still gives "pkgin: empty local package list."

At this point I think you have having a pkgin problem which I am not
super good at diagnosing.  I think, that you can remove the contents of
/var/db/pkgin and it will regenerate.  The idea of "keep" packages is
actually stored in the automatic=YES variable in the pkgdb.

>>> 'pkg_admin check' gives a lot of errors to the effect of:
>>>
>>> pkg_admin: libreoffice-7.5.1.2: File `/usr/pkg/libreoffice-7.5.1.2/lib/libreoffice/sha
>>> re/extensions/dict-is/license.txt' is in +CONTENTS but not on filesystem!
>>>
>>> but mentions no other packages, just libreoffice.
>>
>>So your installed libreoffice is broken.  I suggest 'pkgin rm
>>libreoffice' to get to a safer that.
>
> Attempting this gives the "pkgin: empty local package list." error

See previous comment.

>>Also check if you hvae /usr/bin/pkg_info and /usr/pkg/sbin/pkg_info both
>>and if they print the same thing.
>
> /usr/pkg/sbin/pkg_info -V    gives   20211115
> /usr/sbin/pkg_info -V        gives   20201218

That seems ok, given that you have PKG_DBDIR set.

>>Try also "pkgin sk" and "pkgin -n upgrade".
>
> "pkgin sk" gives: a long list (looks like all of my installed packages)

It should be far smaller than your installed 


> "pkgin -n upgrade" - gives error: "pkgin: empty local package list."
>
> I'm puzzled as to why pkgin is storing its information in /var/db/pkgin
> (and why the manpage still says that's where it should store it).

Because that's ${VARBASE}/pkgin, which is ok.   There is a fair
question "why is VARBASE on NetBSD /var which is outside ${PREFIX}?"
But that is historically how it is.

So at this point you appear to have a corrupted pkgin database.


Home | Main Index | Thread Index | Old Index