Solved pkg: No SRV record found for the repo FreeBSD

Any idea how to fix this?

Code:
# pkg update
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100%    178 B   0.2kB/s    00:01
Fetching packagesite.pkg: 100%    7 MiB   7.0MB/s    00:01
Processing entries: 100%
FreeBSD repository update completed. 32886 packages processed.
All repositories are up to date.

# pkg upgrade
Updating FreeBSD repository catalogue...
pkg: No SRV record found for the repo 'FreeBSD'
pkg: packagesite URL error for pkg+http://pkg.FreeBSD.org/FreeBSD:14:aarch64/quarterly/packagesite.pkg -- pkg+:// implies SRV mirror type
pkg: packagesite URL error for pkg+http://pkg.FreeBSD.org/FreeBSD:14:aarch64/quarterly/packagesite.txz -- pkg+:// implies SRV mirror type
Unable to update repository FreeBSD
Error updating repositories!
 
Last time I had this same problem I manually set a mirror in
/usr/local/etc/pkg/repos/FreeBSD.conf (but only temporarily)
Code:
FreeBSD: {
      url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest"
}
Change it with any specific mirror:
FreeBSD pkg mirrors
But I don't know why this problem occurs, probably your automatically selected mirror is unreachable

Edit: Better go with the answer above mine.
 
I also had the same problem. I tried replacing the PKG mirror with:

FreeBSD: {
url: "pkg+http://pkg.freebsd.org/${ABI}/quarterly",
mirror_type: "srv",
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/pkg",
enabled: yes
}


FreeBSD 14 Update and Upgrade pkg Packages With pkg Binary Package Manager

Or you can replace the PKG mirror with:

TCBSD: {
url: "https://tcbsd.beckhoff.com/TCBSD/14/stable/packages"
enabled: true,
signature_type: "fingerprints",
fingerprints: "/usr/share/keys/bhf-pkg"
}
 
Back
Top