Can't update pkg in Iocage

xaser

Dabbler
Joined
Mar 8, 2020
Messages
34
Hi guys,

I have been trying to update my Plex jail (manual jail) and am getting the following errors:

root@plex:~ # pkg update
Updating FreeBSD repository catalogue...
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/latest/meta.txz: Not Found
repository FreeBSD has no meta file, using default settings
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/latest/packagesite.pkg: Not Found
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/latest/packagesite.txz: Not Found
Unable to update repository FreeBSD
Error updating repositories!
root@plex:~ #

root@plex:~ # pkg upgrade
Updating FreeBSD repository catalogue...
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/latest/meta.txz: Not Found
repository FreeBSD has no meta file, using default settings
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/latest/packagesite.pkg: Not Found
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/latest/packagesite.txz: Not Found
Unable to update repository FreeBSD
Error updating repositories!
root@plex:~ #


I am not sure what's going on? I recently moved Truenas and updated all my jails (they are all 11.3).

Any ideas?

Thank you!
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
Looks like a network issue.
Check your access to the internet.
 

xaser

Dabbler
Joined
Mar 8, 2020
Messages
34
Thank you - I checked and the server is up (and all the jails connect to both the internet and intranet).
Also, if you click the link above, it also gives an error 404 - is that the wrong address?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
I think you might find that 11.3 is what changed... no longer supported.

If you're considering using that system in the future to add software and keep it updated, consider moving to at least 12 if not 13.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
@sretalla is correct. Upstream FreeBSD end-of-lifed all the 11 links. You'll need to recreate your jails on >= 12.3.
 

xaser

Dabbler
Joined
Mar 8, 2020
Messages
34
Sorry for going MAI here - in case it helps, I created a new jail (13.1) and re-installed Plex Server and that obviously fixed the issue :) Thank you!
 

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
@sretalla is correct. Upstream FreeBSD end-of-lifed all the 11 links. You'll need to recreate your jails on >= 12.3.
So recreate is necessary? I upgraded my 11.3 jail to 13.1 but I still get the same pkg error as the OP. I can't do anything with my existing jail apart from moving its contents to a new one?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
You had a window of several years when you could have upgraded, but that window is now closed.

Creating a new jail and transferring the important content is all you have.
 

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
You had a window of several years when you could have upgraded, but that window is now closed.

Creating a new jail and transferring the important content is all you have.

But what upgrade window did I miss? The jail in question is already upgraded to 13.1 as of this summer or maybe in 2021, but positively after 11.3 went EOL on 30 September 2020.

I am puzzled by the fact that the pkg output mentions version 11 when the jail runs on 13.

Code:
root@truenas ~ % iocage console webdev
Last login: Tue Nov 29 17:56:21 on pts/4
FreeBSD 13.1-RELEASE n245376-eba770b30ff TRUENAS

root@webdev:~  # pkg update
Updating FreeBSD repository catalogue...
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/quarterly/meta.txz: Not Found
repository FreeBSD has no meta file, using default settings
pkg: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/quarterly/packagesite.txz: Not Found
Unable to update repository FreeBSD
Error updating repositories!
root@webdev:~  #
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
If the jail in question is 13.1 already then

Code:
iocage console <jailname>
pkg-static install -f pkg


will probably do the trick.
 

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
If the jail in question is 13.1 already then

Code:
iocage console <jailname>
pkg-static install -f pkg


will probably do the trick.

No luck.
But look at the 3 ping results. pkg & pkg-static are looking for http://... but it is not resolvable when pinging with http/s. Server name only resolves and is contacted, though. Does this explain anything?

Code:
root@webdev:~  # pkg-static install -f pkg
Updating FreeBSD repository catalogue...
pkg-static: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/quarterly/meta.txz: Not Found
repository FreeBSD has no meta file, using default settings
pkg-static: http://pkgmir.geo.freebsd.org/FreeBSD:11:amd64/quarterly/packagesite.txz: Not Found
Unable to update repository FreeBSD
Error updating repositories!

root@webdev:~  # ping http://pkgmir.geo.freebsd.org
ping: cannot resolve http://pkgmir.geo.freebsd.org: Unknown host

root@webdev:~  # ping https://pkgmir.geo.freebsd.org
ping: cannot resolve https://pkgmir.geo.freebsd.org: Unknown host

root@webdev:~  # ping pkgmir.geo.freebsd.org
PING pkgmir.geo.freebsd.org (147.28.184.43): 56 data bytes
64 bytes from 147.28.184.43: icmp_seq=0 ttl=55 time=33.518 ms
64 bytes from 147.28.184.43: icmp_seq=1 ttl=55 time=33.578 ms
64 bytes from 147.28.184.43: icmp_seq=2 ttl=55 time=33.519 ms
64 bytes from 147.28.184.43: icmp_seq=3 ttl=55 time=33.665 ms
64 bytes from 147.28.184.43: icmp_seq=4 ttl=55 time=33.463 ms
^C
--- pkgmir.geo.freebsd.org ping statistics ---
5 packets transmitted, 5 packets received, 0.0% packet loss
round-trip min/avg/max/stddev = 33.463/33.549/33.665/0.069 ms
root@webdev:~  #
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You have FreeBSD:11:amd64 in your repo config - that's not going to work. You are sure this jail was updated?

Are you by any chance using uname to check? This command does not give you the installed FreeBSD version. It gives you the kernel version which is the kernel of your NAS host.

The correct command to check the FreeBSD version is - surprise - freebsd-version.

If your jail is really 13.1 you probably need to update /etc/pkg/FreeBSD.conf. Here's a default version from a current system:
Code:
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/quarterly",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}


And ping only takes host names or IP addresses, not complete URLs. Your command output is perfectly expected. The error is probably because there is either a hardcoded version 11 in your repo config or your jail is really still running FreeBSD 11.

HTH,
Patrick
 
Last edited:

guermantes

Patron
Joined
Sep 27, 2017
Messages
213
Oh dang!
And there I was thinking that 13.1 specified upon login to the jail referred to the jail.
Guess I need to recreate then... :-(
Thanks for the help!

Code:
root@truenas /mnt/TANK/iocage/images % iocage console webdev
Last login: Tue Nov 29 20:07:38 on pts/4
FreeBSD 13.1-RELEASE n245376-eba770b30ff TRUENAS   

root@webdev:~  # freebsd-version
11.3-RELEASE-p14
root@webdev:~  #
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Just upgrade it - iocage upgrade -r 13.1 <jailname>, then go ahead with the packages.
 

richiie89

Cadet
Joined
Jan 14, 2023
Messages
5
i might be wrong and i might be posting this in wrong thread, so please point me in right direction.
TrueNAS-13.0-U3.1 (3153285d7d)

pkg update
Updating local repository catalogue...
pkg: file:///usr/ports/packages/meta.txz: No such file or directory
repository local has no meta file, using default settings
pkg: file:///usr/ports/packages/packagesite.pkg: No such file or directory
pkg: file:///usr/ports/packages/packagesite.txz: No such file or directory
Unable to update repository local
Error updating repositories!

What should i do to resolv this?
 

Alecmascot

Guru
Joined
Mar 18, 2014
Messages
1,177
You need to be in a jail !!
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
What should i do to resolv this?
As you were already told at least twice in the other thread you posted in, don't run pkg commands in the base TrueNAS system.
 

richiie89

Cadet
Joined
Jan 14, 2023
Messages
5
Thank you for information, i solved the problem by doing the following: fixed by editing the configuration files in /usr/local/etc/pkg/repos/, setting toggling the “enabled” parameter to “no” for local.conf and to “yes” for FreeBSD.conf

After this was done, i run pkg update

root@omv[~]# pkg update
Updating FreeBSD repository catalogue...
Fetching meta.conf: 100% 163 B 0.2kB/s 00:01
Fetching packagesite.pkg: 100% 6 MiB 6.8MB/s 00:01
Processing entries: 100%
FreeBSD repository update completed. 32405 packages processed.
All repositories are up to date.

Followed by pkg upgrade
[399/401] Upgrading py39-coloredlogs from 15.0 to 15.0.1...
[399/401] Extracting py39-coloredlogs-15.0.1: 100%
Compiling glib schemas
No schema files found: doing nothing.
Running fc-cache to build fontconfig cache...
Generating GIO modules cache
=====
Message from py39-urllib3-1.26.13,1:
Message from vm-bhyve-1.5.0:

--
Please note, if upgrading from version 1.1, it is advised to shutdown guests
and restart the host in order to re-create all virtual switches using new identifiers.
You may need to manually remove /usr/local/etc/collectd.conf if it is no longer needed.
root@omv[~]#
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
Did you do this in a jail, or in the base system? If you did it in the base system, you've likely badly broken things. In a jail, you shouldn't have needed to mess with the configuration files at all.
 
Top