Discussion:
Yet another (fatal?) pkg upgrade error
Ronald F. Guilmette
2021-04-06 02:50:44 UTC
Permalink
I'm trying to work out what I can do to get around the problem(s) described
in my prior message, and now it appears that even the "pkg info" command is
seriously malfunctioning for some unknown reason, making the resolution of
that prior problem all that much harder.

Specifically, in response to the following command:

pkg info --file /usr/local/lib/libglib-2.0.so.0

I get only the following rather unhelpfuland uninformative error message:

pkg: archive_read_open_fd: Unrecognized archive format

What is the solution for this? It appears that some data base file
somewhere (where?) is most probably corrupted. (I don't believe that
corruption was in any way my fault, but I am altogether less interested
in assigning blame at the moment than I am in just fixing the problem(s).)

So, what data base file, specifically, is corrupted and how many I recreate
or regerenate it again into a "good" state?

And why doesn't the above error message provide me with even the slightest
clue as to what file, exactly, has gone goofy? Would it have been all that
hard to include the pathname, you know, just as a small courtesy for exactly
such situations?
Graham Perrin
2021-04-06 03:10:20 UTC
Permalink
Post by Ronald F. Guilmette
pkg info --file /usr/local/lib/libglib-2.0.so.0
pkg: archive_read_open_fd: Unrecognized archive format
The same here:

***@mowa219-gjp4-8570p:~ # pkg info pkg info --file
/usr/local/lib/libglib-2.0.so.0
***@mowa219-gjp4-8570p:~ # pkg info --file /usr/local/lib/libglib-2.0.so.0
pkg: archive_read_open_fd: Unrecognized archive format
***@mowa219-gjp4-8570p:~ # pkg provides /usr/local/lib/libglib-2.0.so.0
Name    : glib-2.66.7_1,1
Desc    : Some useful routines of C programming (current stable version)
Repo    : FreeBSD
Filename:
usr/local/share/gdb/auto-load/usr/local/lib/libglib-2.0.so.0.6600.7-gdb.py
          usr/local/lib/libglib-2.0.so.0.6600.7
          usr/local/lib/libglib-2.0.so.0
Name    : glib-2.66.4_1,1
Desc    : Some useful routines of C programming (current stable version)
Repo    : poudriere
Filename:
usr/local/share/gdb/auto-load/usr/local/lib/libglib-2.0.so.0.6600.7-gdb.py
          usr/local/lib/libglib-2.0.so.0.6600.7
          usr/local/lib/libglib-2.0.so.0
***@mowa219-gjp4-8570p:~ # file /usr/local/lib/libglib-2.0.so.0
/usr/local/lib/libglib-2.0.so.0: symbolic link to libglib-2.0.so.0.6600.7
***@mowa219-gjp4-8570p:~ # date ; uname -v
Tue Apr  6 04:09:03 BST 2021
FreeBSD 14.0-CURRENT #91 main-n245827-361e9501800: Mon Apr  5 17:59:57
BST 2021
***@mowa219-gjp4-8570p:/usr/obj/usr/src/amd64.amd64/sys/GENERIC-NODEBUG
***@mowa219-gjp4-8570p:~ #
David Christensen
2021-04-06 06:38:09 UTC
Permalink
Post by Ronald F. Guilmette
I'm trying to work out what I can do to get around the problem(s) described
in my prior message, and now it appears that even the "pkg info" command is
seriously malfunctioning for some unknown reason, making the resolution of
that prior problem all that much harder.
pkg info --file /usr/local/lib/libglib-2.0.so.0
pkg: archive_read_open_fd: Unrecognized archive format
What is the solution for this? It appears that some data base file
somewhere (where?) is most probably corrupted. (I don't believe that
corruption was in any way my fault, but I am altogether less interested
in assigning blame at the moment than I am in just fixing the problem(s).)
So, what data base file, specifically, is corrupted and how many I recreate
or regerenate it again into a "good" state?
And why doesn't the above error message provide me with even the slightest
clue as to what file, exactly, has gone goofy? Would it have been all that
hard to include the pathname, you know, just as a small courtesy for exactly
such situations?
I believe 'pkg info --file pkg-file' expects 'pkg-file' to be a FreeBSD
package file (?).


Are you trying to figure out what package provides
/usr/local/lib/libglib-2.0.so.0 ? If so, see pkg-which(8):

2021-04-05 23:31:56 ***@f3 ~
$ freebsd-version; uname -a
12.2-RELEASE-p5
FreeBSD f3.tracy.holgerdanske.com 12.2-RELEASE-p4 FreeBSD
12.2-RELEASE-p4 GENERIC amd64

2021-04-05 23:32:15 ***@f3 ~
$ pkg which /usr/local/lib/libglib-2.0.so.0
/usr/local/lib/libglib-2.0.so.0 was installed by package glib-2.66.7,1


David

Loading...