Solved 11.2 to 12.2 pkg-static failing

joel.bodenmann

Active Member

Reaction score: 35
Messages: 171

I've just upgraded a very outdated 11.2 system to 12.2. The update itself went without any issues.
However, I'm unable to update pkg:

Code:
root@host:~ # pkg-static install -f pkg
pkg-static: Warning: Major OS version upgrade detected.  Running "pkg-static install -f pkg" recommended
Updating FreeBSD repository catalogue...
pkg-static: repository meta has wrong version 2
pkg-static: Repository FreeBSD load error: meta cannot be loaded No error: 0
Fetching meta.txz: 100%    916 B   0.9kB/s    00:01
pkg-static: repository meta has wrong version 2
repository FreeBSD has no meta file, using default settings
Fetching packagesite.txz: 100%    6 MiB   6.7MB/s    00:01
pkg-static: repository meta has wrong version 2
pkg-static: Repository FreeBSD load error: meta cannot be loaded No error: 0
Unable to open created repository FreeBSD
Unable to update repository FreeBSD
Error updating repositories!

The host does have access to the internet (as witnessed by the fetching actually reporting traffic).
What am I doing wrong/missing?
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 11,564
Messages: 37,878

Try pkg bootstrap -f.

Code:
bootstrap
             This is for compatibility with the pkg(7) bootstrapper.  If pkg
             is already installed, nothing is done.

             If invoked with the -f flag an attempt will be made to reinstall
             pkg from remote repository.
 
Top