Yet another (fatal?) pkg upgrade error

David Christensen dpchrist at
Tue Apr 6 06:38:26 UTC 2021

On 4/5/21 7:50 PM, Ronald F. Guilmette wrote:
> 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/
> 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?

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/ ?  If so, see pkg-which(8):

2021-04-05 23:31:56 dpchrist at f3 ~
$ freebsd-version; uname -a
FreeBSD 12.2-RELEASE-p4 FreeBSD 
12.2-RELEASE-p4 GENERIC  amd64

2021-04-05 23:32:15 dpchrist at f3 ~
$ pkg which /usr/local/lib/
/usr/local/lib/ was installed by package glib-2.66.7,1


More information about the freebsd-questions mailing list