pkg XX candidates when pkg update or upgrade

I already took a look to many other posts on that subject but I am unable to solve my issue.

When I do a doas pkg -d upgrade I got :
Code:
[...]
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libarchive.so.7
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libc.so.7
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libcrypto.so.35
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libelf.so.2
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libjail.so.1
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libm.so.5
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libssl.so.35
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libthr.so.3
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libutil.so.10
DBG(1)[10013]> (solver) for package: pkg cannot find provide for requirement: libz.so.6
[...]

My FreeBSD.conf :
Code:
FreeBSD-ports: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg"
  enabled: yes
}
FreeBSD-ports-kmods: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/kmods_quarterly_${VERSION_MINOR}",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}
FreeBSD-base: {
  url: "pkg+https://pkg.FreeBSD.org/${ABI}/base_release_${VERSION_MINOR}",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkgbase-${VERSION_MAJOR}",
  enabled: no
}
I tried already to doas pkg upgrade -f and also to doas pkg bootstrap -f (as it is like pkg is the one which cannot find requirement) but still got the same issue.

pkg info pkg :
Code:
pkg-2.4.2
Name           : pkg
Version        : 2.4.2
Installed on   : Wed Dec 24 14:57:20 2025 CET
Origin         : ports-mgmt/pkg
Architecture   : FreeBSD:15:amd64
Prefix         : /usr/local
Categories     : ports-mgmt
Licenses       : BSD2CLAUSE
Maintainer     : pkg@FreeBSD.org
WWW            : https://github.com/freebsd/pkg
Comment        : Package manager
Options        :
    DOCS           : on
Shared Libs required:
    libarchive.so.7
    libc.so.7
    libcrypto.so.35
    libelf.so.2
    libjail.so.1
    libm.so.5
    libssl.so.35
    libthr.so.3
    libutil.so.10
    libz.so.6
Shared Libs provided:
    libpkg.so.4
Annotations    :
    FreeBSD_version: 1500068
    build_timestamp: 2025-12-18T01:03:09+0000
    built_by       : poudriere-git-3.4.4-15-g61aba751
    port_checkout_unclean: no
    port_git_hash  : f0628a6479cfa3bb95c51293e4871eb489daa3b6
    ports_top_checkout_unclean: no
    ports_top_git_hash: 1a20e675c4bf47165b603d331df194a5f84c4e87
Flat size      : 53.4MiB
Description    :
Package management tool

Many thanks
 
I would indeed better said that it is not an issue but a curiosity and wanted to understand why I got this in my laptop, and don't have the issue in the 5 other servers I have, but I read "pkg cannot find provide for requirement" I am wondering if something is missing
 
It's looking for base OS libraries. So unless you used pkgbase it's not going to find a package that contains those libraries.
 
Yes I am now using pkgbase after pkgbasified my system, perhaps it is the consequence (?) as I don't have this behavior on 15.0 installed from scratch
 
Yes I am now using pkgbase after pkgbasified my system, perhaps it is the consequence (?) as I don't have this behavior on 15.0 installed from scratch
You may, or may not have mangled your set up in some way; it is hard to say which.

When running 15.0-RELEASE it is relevant and important to know if you are running:
  1. a "traditional" 15.0-RELEASE, that is: based on the traditional distributions sets (as were all supported -RELEASE versions of the 14 branch and previous ones before that)
    or
  2. a packaged base 15.0-RELEASE where the base OS install is based on packages

A packaged base 15.0-RELEASE you could have gotten from (by means of a supported way):
  • installing a fresh 15.0-RELEASE and opted for Packages (Tech Preview)
  • installing a fresh 15.0-RELEASE and opted for Distribution Sets and later ran pkgbasify of the correct version (preferably the most current one)
You cannot go from a packaged base back to a "normal" non-packaged base. Using pkgbasify is a one way street.
 
thanks Erichans for the detail explanation.

On my side, on my laptop I was on 14.3-RELEASE and did a normal update using freebsd-update.
When I was on 15.0-RELEASE that's when I did a pkgbasify, and that where I start seeing this '5 candidates behavior'
 
Well... I'm fed up with these "candidates"...
Last time, I don't remember, I searched extensively for a solution and didn't save it to my favorites (I regret it).

Well, that's my opinion now, and I'm keeping it here for future reference... If the bugs are recurring... The solutions should be the same once found.
It worked here....
A la windoze golden years... deinstall and reinstall. :->>

My problem...

Code:
# pkg -d update

DBG(1)[9381]> (fetch) CURL> connected to IP 151.101.1.241

FreeBSD-ports-kmods repository is up to date.

All repositories are up to date.

DBG(1)[9381]> (db) want to get an advisory lock on a database
Checking for upgrades (7 candidates): 100%
Processing candidates (7 candidates): 100%
DBG(1)[9381]> (universe) removing gpu-firmware-radeon-kmod-cedar from the request as it is the same as local
DBG(1)[9381]> (universe) removing gpu-firmware-radeon-kmod-rs690 from the request as it is the same as local
DBG(1)[9381]> (universe) removing gpu-firmware-intel-kmod-tigerlake from the request as it is the same as local
DBG(1)[9381]> (universe) removing gpu-firmware-radeon-kmod-sumo2 from the request as it is the same as local
DBG(1)[9381]> (universe) removing gpu-firmware-amd-kmod-yellow-carp from the request as it is the same as local
DBG(1)[9381]> (universe) removing gpu-firmware-amd-kmod-smu-13-0-10 from the request as it is the same as local
DBG(1)[9381]> (universe) removing gpu-firmware-radeon-kmod-btc from the request as it is the same as local
Checking integrity...DBG(1)[9381]> (jobs) check integrity for 0 items added
 done (0 conflicting)
Your packages are up to date.
DBG(1)[9381]> (db) release an advisory lock on a database

By the way... (it was 156 when I started)... My solution:

Code:
#!/bin/sh

pkg -d upgrade 2>&1     \
    | grep removing     \
    | cut -d ' ' -f 4   \
    | sort              \
    | while read i; do
    ASSUME_ALWAYS_YES=yes pkg delete $i
    ASSUME_ALWAYS_YES=yes pkg install $i
done

Save this, chmod +x, and run as root.
 
Back
Top