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:

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!

And installation totally fails.

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

Code:
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
 
Last edited by a moderator:
I don't have these. Do you have any files under /usr/local/etc/pkg/repos?

I have only the file FreeBSD.conf

Well, it looks like I fixed the original issue by removing _${VERSION_MINOR} from the pointer for the kmod files.

Ken Gordon
 
I have the following:
Code:
~ $ uname -r
14.3-RELEASE-p5
My repositories are as follows:
Code:
~ $ 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:
Code:
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.
 
Last edited by a moderator:
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.
 
He specifically said he's on 14.3:
Yes. But seemingly confused about what's correct, maybe because things for upcoming 15.0 are discussed within other threads.

For 14.3, yes, old name (FreeBSD and FreeBSD-kmods) are correct.
 
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)
 
Well, over the past few days, several things have occurred: 1) I "fat-fingered" an rm and so damaged my system that I had to completely reinstall and reconfigure it from scratch. :rude:

And 2) I can, now, no longer find my office printer at all. I can ping it successfully, but no bit of software I have here will find it: not hplip, not CUPS, not avahi, not anything I have tried so far. The printer, an HP-OfficeJetPro 9010 series all-in-one, is connected to my LAN wirelessly (only), I have activated my wireless system in rc.conf, have written and implemented the correct wpa-supplicant.conf (I think) and the system finds and activates the wireless interface on boot, but still NOTHING finds the printer.

I have a second HP all in one in a son's office upstairs which is connected by cable to the LAN, and CUPS finds that one just fine.

Oh! 3) Also, despite building the system from scratch, the Nvidia driver version 580 will NOT load the nvidia-modeset module at all (again) so I still have to use version 470 to get it to work.

And 4), Mizutamari will no longer install correctly, and will no longer install Pegasus-Mail correctly either.

Rats! :rude:

It has been kind of like hitting yourself in the head with a hammer: it feels so good when you stop.

Ken Gordon
 
Back
Top