Solved pkg problem

After upgrading my system to FreeBSD-14.3-RELEASE, and after doing pkg upgrade, I am now getting the following after every attempt to install a package:


root@KensOffice:/ # pkg install sane-backends
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Updating FreeBSD-ports repository catalogue...
Unable to update repository FreeBSD-ports
Updating FreeBSD-ports-kmods repository catalogue...
Unable to update repository FreeBSD-ports-kmods
Error updating repositories!


And installation totally fails.

I have checked and rechecked the FreeBSD.conf files for accuracy. They look like this:


FreeBSD: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly",
mirror_type: "SRV",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}
FreeBSD-kmods: {
url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_quarterly_${VERSION_MINOR}",
mirror_type: "SRV",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}


And pkg search no longer works at all also. I get essentially the same error message.

So, where is my error? Or is there one? I am baffled.

Ken Gordon
 
I have the following:
~ $ uname -r
14.3-RELEASE-p5

My repositories are as follows:
~ $ pkg -vv | sed -nE -e '/(OSVERSION|ABI)/ p' -e '/^Repositories:/,$ p'
IGNORE_OSVERSION = false;
ABI = "FreeBSD:14:amd64";
ALTABI = "freebsd:14:x86:64";
OSVERSION = "1403000";
Repositories:
FreeBSD: {
url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/quarterly",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}
FreeBSD-kmods: {
url : "pkg+https://pkg.FreeBSD.org/FreeBSD:14:amd64/kmods_quarterly_3",
enabled : yes,
priority : 0,
mirror_type : "SRV",
signature_type : "FINGERPRINTS",
fingerprints : "/usr/share/keys/pkg"
}
~ $

When I tried # pkg upgrade yesterday and today I get the following, which I am cautious about after previous experiences:
Installed packages to be UPGRADED:
firefox: 144.0_2,2 -> 144.0.2,2 [FreeBSD]
I am waiting to see if anyone has a problem with this before updating my only -RELEASE installation.
 
Well, it looks like I fixed the original issue by removing _${VERSION_MINOR} from the pointer for the kmod files.
For 14.3-RELEASE, using quarterly, a correct setting for the FreeBSD-kmods repository is:
Rich (BB code):
FreeBSD-kmods: {
    url: pkg+https://pkg.freebsd.org/${ABI}/kmods_quarterly_${VERSION_MINOR},
    enabled: yes,
    priority: 0,
    signature_type: "fingerprints",
    fingerprints: "/usr/share/keys/pkg",
    mirror_type: "srv",
}

However, using:
Rich (BB code):
FreeBSD-kmods: {
    url: pkg+https://pkg.freebsd.org/${ABI}/kmods_quarterly,
    enabled: yes,
    priority: 0,
    signature_type: "fingerprints",
    fingerprints: "/usr/share/keys/pkg",
    mirror_type: "srv",
}
means you are using the FreeBSD-kmods for FreeBSD 14.3-STABLE! Sooner or later this incorrect setting for 14.3-RELEASE will get you into problems.

There seems to be other things wrong with your settings:
(Perhaps as a result from Difficulty upgrading to 14.3 from 14.2)
Rich (BB code):
root@KensOffice:/ # pkg install sane-backends
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Updating FreeBSD-ports repository catalogue...
Unable to update repository FreeBSD-ports
Updating FreeBSD-ports-kmods repository catalogue...
Unable to update repository FreeBSD-ports-kmods
Error updating repositories!
Apparently you have inserted FreeBSD-ports-kmods in your settings: you should not be using this; this is a new repository name used in FreeBSD-15.0.

To get more insight in your actual settings, please post the output of two commands:
pkg -vv | sed -nE -e '/(OSVERSION|ABI)/ p' -e '/^Repositories:/,$ p'
ls -l /usr/local/etc/pkg/repos/*.conf
 
What make things more complexed as it should be is pkgbase.

As new repo for base is to be started (officially) providing base packages appears (I consider it "on test" until availability of 15.0-Release is officially announced), repos for ports needs to be distinguished.

Because of this, for 15.0 (currently Beta4), repo name FreeBSD was changed to Freebsd-ports and FreeBSD-kmods was changed to FreeBSD-ports-kmods respectively, keeping 14.x and before as is to avoid POLA violation.

pkgbase becomes official starting from 15.0, and my understanding is that support codes in older versions are for sane upgrades to 15.0 and later using pkgbase.
 
The OP did get the following when upgrading:
root@KensOffice:/ # pkg install sane-backends
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
Updating FreeBSD-ports repository catalogue...
Unable to update repository FreeBSD-ports
Updating FreeBSD-ports-kmods repository catalogue...
Unable to update repository FreeBSD-ports-kmods
Error updating repositories!
There was definitely something wrong with pkg upgrade yesterday because it wanted to upgrade itself so I cancelled it. Today it didn't ask to upgrade itself but I got a very similar upgrade version number for firefox.

The above output has the repositories for 15.0 :-/
 
There was definitely something wrong with pkg upgrade yesterday because it wanted to upgrade itself so I cancelled it.
It would depend on when you've upgraded before.
ports-mgmt/pkg is updated at 2025-10-23 23:53:58 +0000 (MFC'ed at 2025-10-23 23:54:26 +0000).
And if any dependencies (at least LIB_DEPENDS) is / are upgraded, the port (depending upon the upgraded) are rebuilt regardless it's actually upgraded or not. This is the behavior of poudriere without -S option. Paranoid but safest way not to be broken by forgotton bumps. But also causing the absense of pkgs.
 
There was definitely something wrong with pkg upgrade yesterday because it wanted to upgrade itself so I cancelled it.
I did a pkg upgrade of 198 packages a minute ago on 15.0, they downloaded, but before installing it wanted to reinstall or update pkg first. I pressed Y and pkg updated, the rest of the pkgs updated, and no problems after reboot.

I didn't check if pkg changed versions but I was fine with it handling itself before the rest of the packages! (was seamless, vs pkg not updating before the other packages and potentially missing some updated-handling that newer packages might expect from pkg, or having the general pkg upgrade halt with error and first having to update pkg manually with a separate command)
 
Back
Top