problems with pkg 1.20.8

Hi all, 👋

I´m using FreeBSD 13.2-RELEASE-p3 in a virtual machine (KVM/qemu) on Linux Lite 6.2.

Up till now it has been working fine but as of late I ran into difficulties.

pkg(8) seems to have needed an update as I couldn't install any packages with pkg otherwise.
So pkg is version 1.20.8 now.

Now I installed lnav, which went well. It could be downloaded and installed.

As a second step I wanted to install inxi. But it failed… 😲 .

Here´s the protocol of it:


Code:
rosika@freebsdTest ~ [1]> sudo pkg update
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01    
Fetching packagesite.pkg: 100%    7 MiB   1.4MB/s    00:05    
Processing entries: 100%
FreeBSD repository update completed. 34069 packages processed.
All repositories are up to date.

rosika@freebsdTest ~> pkg search inxi
inxi-3.3.11.1                  Full featured CLI system information tool

rosika@freebsdTest ~> sudo pkg install lnav
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
    lnav: 0.11.2

Number of packages to be installed: 1

The process will require 7 MiB more space.
2 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching lnav-0.11.2.pkg: 100%    2 MiB   1.1MB/s    00:02    
Checking integrity... done (0 conflicting)
[1/1] Installing lnav-0.11.2...
[1/1] Extracting lnav-0.11.2: 100%

This was the good part.

But then:


Code:
rosika@freebsdTest ~> sudo pkg install inxi
Updating FreeBSD repository catalogue...
pkg: No SRV record found for the repo 'FreeBSD'
pkg: packagesite URL error for pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly/packagesite.pkg -- pkg+:// implies SRV mirror type
pkg: packagesite URL error for pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly/packagesite.txz -- pkg+:// implies SRV mirror type
Unable to update repository FreeBSD
Error updating repositories!

rosika@freebsdTest ~ [3]> pkg search inxi
pkg: Repository FreeBSD missing. 'pkg update' required
pkg: Repository FreeBSD cannot be opened. 'pkg update' required

rosika@freebsdTest ~ [1]> sudo pkg update
Updating FreeBSD repository catalogue...
pkg: No SRV record found for the repo 'FreeBSD'
Fetching meta.conf: 100%    163 B   0.2kB/s    00:01    
pkg: packagesite URL error for pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly/packagesite.pkg -- pkg+:// implies SRV mirror type
pkg: packagesite URL error for pkg+http://pkg.FreeBSD.org/FreeBSD:13:amd64/quarterly/packagesite.txz -- pkg+:// implies SRV mirror type
Unable to update repository FreeBSD
Error updating repositories!

rosika@freebsdTest ~ [1]> pkg -v
1.20.8

Why could I install lnav and the subsequent installation of inxi failed?

And from now on pkg update doesn´t work either…
I am bafflled…

Can anyone help ❓

Thanks a lot in advance and many greetings from Rosika 🙂
 
Last edited by a moderator:
Hi getopt, 👋

thanks for your reply.

But why should there be any DNS/network problems?
Pingig some website worked perfectly and seems to prove there´s no problem with the internet connection... 🤔 .

Besides: installing the first package I mentioned (lnav) actually did work.
Those problems arose not before using pkg version 1.20.8.

Anyway: thank you for your help.

Many greetings from Rosika 🙂
 
I fixed the "No SRV record found for the repo 'FreeBSD'" problem (which, for me, was benign) by updating the config file to the new template;
Code:
# diff  /usr/local/etc/pkg/repos/FreeBSD.conf.20231022 /usr/local/etc/pkg/repos/FreeBSD.conf
1c1
< FreeBSD: { url: "http://pkg0.bbt.freebsd.org/${ABI}/latest" }
---
> FreeBSD: { url: "http://pkg0.bbt.freebsd.org/${ABI}/latest", mirror_type: "NONE" }
 
Hi gpw928 , 👋

thanks for your reply.
Sounds good. I´m happy to say I could resolve my issue as well. In fact it´s similar to what you suggested.

In
Code:
/etc/pkg/FreeBSD.conf
I changed the url line from
Code:
url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
to
Code:
url: "http://pkg.FreeBSD.org/${ABI}/quarterly",
.

Now the update and upgrade and even the installation of packages work again.
However I still get the message
Code:
pkg: No SRV record found for the repo 'FreeBSD' mean
.

Many thanks and many greetings from Rosika 🙂
 
I think that the apparent DNS issue is tied up with the missing mirror_type: "NONE" in /usr/local/etc/pkg/repos/FreeBSD.conf.

I suggest you install the ports-mgmt/fastest_pkg package, run fastest_pkg, and do whatever it says (which will create a new optimal FreeBSD.conf file).
 
This is what I have in /usr/local/etc/pkg/repos/FreeBSD.conf
Code:
FreeBSD: {
  url: "pkg+https://pkg.freebsd.org/${ABI}/latest",
  enabled: yes
}
 
Hi again, 👋

thanks a lot for your replies.

getopt :

Here´s what I get:

Code:
drill SRV _https._tcp.pkg.freebsd.org
;; ->>HEADER<<- opcode: QUERY, rcode: SERVFAIL, id: 296
;; flags: qr rd ra ; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; _https._tcp.pkg.freebsd.org.    IN    SRV

;; ANSWER SECTION:

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 0 msec
;; SERVER: 127.0.0.1
;; WHEN: Mon Oct 23 16:11:01 2023
;; MSG SIZE  rcvd: 45

What do you think of it?

This is what I have in /usr/local/etc/pkg/repos/FreeBSD.conf [...]
Thanks. I may try it.

gpw928 :

Thanks for your suggestion as well.

BTW:

Is there anything wrong with leaving the settings as they are?

Code:
cat /etc/pkg/FreeBSD.conf
# $FreeBSD$
#
# To disable this repository, instead of modifying or removing this file,
# create a /usr/local/etc/pkg/repos/FreeBSD.conf file:
#
#   mkdir -p /usr/local/etc/pkg/repos
#   echo "FreeBSD: { enabled: no }" > /usr/local/etc/pkg/repos/FreeBSD.conf
#

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

It seems to work well this way.

Thanks a lot to all of you. ♥️

Many greetings from Rosika 🙂
 
Hi SirDice 👋

FreeBSD is running in a virtual machine, as I mentioned in my post #1.
127.0.0.1 is the loopback address (also known as localhost), right?
So I guess is has something to do with it.

Many greetings from Rosika 🙂
 
Try drill @8.8.8.8 SRV _https._tcp.pkg.freebsd.org

If that provides a good answer then you know that local resolver isn't working correctly.
 
Hi SirDice, 👋

thanks. I get this now:

Code:
drill @8.8.8.8 SRV _https._tcp.pkg.freebsd.org
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 31410
;; flags: qr rd ra ; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;; _https._tcp.pkg.freebsd.org.    IN    SRV

;; ANSWER SECTION:
_https._tcp.pkg.freebsd.org.    300    IN    SRV    10 10 443 pkgmir.geo.freebsd.org.
_https._tcp.pkg.freebsd.org.    300    IN    SRV    50 10 443 pkg0.tuk.freebsd.org.
_https._tcp.pkg.freebsd.org.    300    IN    SRV    50 10 443 pkg0.nyi.freebsd.org.
_https._tcp.pkg.freebsd.org.    300    IN    SRV    50 10 443 pkg0.isc.freebsd.org.
_https._tcp.pkg.freebsd.org.    300    IN    SRV    50 10 443 pkg0.bme.freebsd.org.
_https._tcp.pkg.freebsd.org.    300    IN    SRV    50 10 443 pkg0.fra.freebsd.org.

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 63 msec
;; SERVER: 8.8.8.8
;; WHEN: Mon Oct 23 17:14:19 2023
;; MSG SIZE  rcvd: 287

Not quite sure how to interpret it correctly, though.

Cheers from Rosika 🙂
 
That's a respond you should expect to see from your local resolver (the one on 127.0.0.1). So you have a configuration issue there.
 
That's a respond you should expect to see from your local resolver (the one on 127.0.0.1). So you have a configuration issue there.
But it works with
Code:
FreeBSD: {
  url: "http://pkg.FreeBSD.org/${ABI}/quarterly",
  [...]

in "/etc/pkg/FreeBSD.conf"...

Can´t I leave it that way?
 
The issue has nothing to do with the configuration of pkg(8). Your DNS server that's running on 127.0.0.1 isn't providing the correct answers, that's your problem.
 
SirDice

your DNS server that's running on 127.0.0.1 isn't providing the correct answers, that's your problem.
Hmm, I see.
Not sure what I can do about it though... 🤔 .
Is there any need to take action at all?

Cheers from Rosika 🙂
 
The DNS issue is certainly relevant. However, so is /usr/local/etc/pkg/repos/FreeBSD.conf.

Note that the "pkg: No SRV record found for the repo 'FreeBSD'" line is present, even when the DNS is working, and disappears when the config file is changed:
Code:
[strand.127] # cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: { url: "http://pkg0.bbt.freebsd.org/${ABI}/latest" }

[strand.128] # drill SRV _https._tcp.pkg.freebsd.org
;; ->>HEADER<<- opcode: QUERY, rcode: NOERROR, id: 32781
;; flags: qr rd ra ; QUERY: 1, ANSWER: 6, AUTHORITY: 0, ADDITIONAL: 0 
;; QUESTION SECTION:
;; _https._tcp.pkg.freebsd.org.    IN    SRV

;; ANSWER SECTION:
_https._tcp.pkg.freebsd.org.    229    IN    SRV    50 10 443 pkg0.tuk.freebsd.org.
_https._tcp.pkg.freebsd.org.    229    IN    SRV    50 10 443 pkg0.nyi.freebsd.org.
_https._tcp.pkg.freebsd.org.    229    IN    SRV    50 10 443 pkg0.isc.freebsd.org.
_https._tcp.pkg.freebsd.org.    229    IN    SRV    50 10 443 pkg0.bme.freebsd.org.
_https._tcp.pkg.freebsd.org.    229    IN    SRV    50 10 443 pkg0.fra.freebsd.org.
_https._tcp.pkg.freebsd.org.    229    IN    SRV    10 10 443 pkgmir.geo.freebsd.org.

;; AUTHORITY SECTION:

;; ADDITIONAL SECTION:

;; Query time: 46 msec
;; SERVER: 192.168.1.254
;; WHEN: Tue Oct 24 07:57:14 2023
;; MSG SIZE  rcvd: 287

[strand.130] # pkg upgrade
Updating FreeBSD repository catalogue...
pkg: No SRV record found for the repo 'FreeBSD'
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
Code:
[strand.131] # cat <<'EOF' >/usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: { url: "http://pkg0.bbt.freebsd.org/${ABI}/latest", mirror_type: "NONE" }
> EOF

[strand.132] # cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: { url: "http://pkg0.bbt.freebsd.org/${ABI}/latest", mirror_type: "NONE" }

[strand.133] # pkg upgrade
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
 
Points to a DNS or network problem.
pkg(8) devs managed to resolve their issues using SRV records. This now works.

If you're using pkg.freebsd.org, wait until the DNS issue is resolved. It could be that your resolver's (ISP's) cache is corrupted or could be that the authoritative DNS is not returning the correct SRV record.

If you can't wait, simply change the mirror type to "http" and point the URL directly to the the pkg server by removing the "pkg+" from the URL.
 
Hi all, 👋

gpw928 :

thanks for the additional info.

Code:
cat /usr/local/etc/pkg/repos/FreeBSD.conf
FreeBSD: { url: "http://pkg0.bbt.freebsd.org/${ABI}/latest", mirror_type: "NONE" }

I tried it but it was no good for me:

Code:
# pkg upgrade
Updating FreeBSD repository catalogue...
pkg: Repository FreeBSD has a wrong packagesite, need to re-create database
pkg: An error occured while fetching package
pkg: An error occured while fetching package
repository FreeBSD has no meta file, using default settings
pkg: An error occured while fetching package
pkg: An error occured while fetching package
Unable to update repository FreeBSD
Error updating repositories!

So I´ll stay with

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

, which works for me, even if I get the "pkg: No SRV record found for the repo 'FreeBSD'" message.

Thanks a lot for your help.

cy@ :

Thank you very much.

simply change the mirror type to "http" and point the URL directly to the the pkg server by removing the "pkg+" from the URL.

That´s what I did. 👍

Many greetings to all of you.
Rosika 🙂
 
Code:
           pkg_env: {
               http_proxy: "http://myproxy:3128",
           }
pkg.conf(5)

pkg(8) uses fetch(3).

Code:
       HTTP_PROXY	   URL	of  the	 proxy	to use for HTTP	requests.  The
			   document part is ignored.  Only  HTTP  proxies  are
			   supported  for HTTP requests.  If no	port number is
			   specified, the default is 3128.
 
Then the man page(s) need to be updated. There are tons of references to fetch(3) and libfetch still in there.
 
Back
Top