Solved [SOLVED] pkg: unable to find catalogs

I seem to be having some pkg issues today:

pkg install vim-lite
Code:
Updating repository catalogue
digests.txz                                                                                                                 100% 1060KB 151.4KB/s 299.9KB/s   00:07
pkg: Error loading revoked certificates
pkg: Unable to find catalogs

cat /etc/pkg/FreeBSD.conf
Code:
# $FreeBSD: release/10.0.0/etc/pkg/FreeBSD.conf 258710 2013-11-28 14:24:26Z gjb $
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

Code:
# ls /usr/share/keys/
./   ../  pkg/
# ls /usr/share/keys/pkg/
./       ../      trusted/
# ls /usr/share/keys/pkg/trusted/
./                          ../                         pkg.freebsd.org.2013102301
# cat /usr/share/keys/pkg/trusted/pkg.freebsd.org.2013102301
# $FreeBSD: release/10.0.0/share/keys/pkg/trusted/pkg.freebsd.org.2013102301 260609 2014-01-13 22:15:57Z bdrewery $

function: "sha256"
fingerprint: "b0170035af3acc5f3f3ae1859dc717101b4e6c1d0a794ad554928ca0cbb2f438"

cd /usr/src/share/keys && make && make install
Code:
===> pkg (all)
===> pkg/trusted (all)
===> pkg (install)
===> pkg/trusted (install)
install -o root -g wheel  -m 644 pkg.freebsd.org.2013102301 /usr/share/keys/pkg/                                                                                        trusted

pkg update
Code:
Updating repository catalogue
digests.txz                             100% 1057KB   1.0MB/s   1.0MB/s   00:01
pkg: Error loading trusted certificates
pkg: Unable to find catalogs


I'm experiencing the same issue on multiple servers. Any ideas?

ETA: Solved. For some reason, make does not create the revoked directory. No idea why (a) upgrading to FreeBSD 10.0-RELEASE doesn't create the required directories, (b) installing pkg, whether from ports or packages, doesn't create the required directories, or (c) a fresh install from a 10.0-RELEASE ISO doesn't create the required directories. If this is not unique to my 3 different scenarios [*], perhaps a PR is warranted?

[*]
Two machines I upgraded to 10.0-RELEASE did not have the /usr/share/keys directory (and sub-directories) created when either installing pkg from ports or packages.
One machine that I installed 10.0-RELEASE from an ISO image and had pkg installed from ports also did not create the directories.
 
nanotek said:
cd /usr/src/share/keys && make && make install
Code:
===> pkg (all)
===> pkg/trusted (all)
===> pkg (install)
===> pkg/trusted (install)
install -o root -g wheel  -m 644 pkg.freebsd.org.2013102301 /usr/share/keys/pkg/                                                                                        trusted

I'm on 9.2-RELEASE and I don't have this /usr/src/share/keys directory... and I'm having the same problem as you. What to do? Do I have to install these keys manually? Shouldn't they have been installed by pkg? How to do it?

Edit: I use the binary freebsd-update to update my system.
 
I saw that topic. The problem is that I don't have the /usr/src/share/keys directory created and filled. Something must not have been properly done...
 
You need to checkout the appropriate source. For example [0]:
svnlite checkout [url=https://svn0.eu.freebsd.org/base/releng/10.0/]https://svn0.eu.freebsd.org/base/releng/10.0/[/url] /usr/src

That will take a while. When it finishes, try cd /usr/src/share/keys && make && make install again.

[0] replace 10.0 with your current version of FreeBSD.

ETA: If you're not on 10.0-RELEASE, you won't have svnlite, so install subversion with cd /usr/ports/devel/subversion && make install clean then issue the above command, replacing svnlite with svn (e.g. svn checkout [url=https://svn0.eu.freebsd.org/base/releng/10.0/]https://svn0.eu.freebsd.org/base/releng/10.0/[/url] /usr/src)
 
Back
Top