Solved pkg broken after upgrading from 9.3 to 10.1

Hi,
I upgraded my FreeBSD box from 9.3 to 10.1 . In 9.3 I have been using the pkg binary manager.

I am at the point now to upgrade all the packages before doing the final
freebsd-update install in order to delete the old (no longer used) system libraries.

Unfortunately I have the following problem with pkg:

Code:
~> pkg stats
pkg: Warning: Major OS version upgrade detected.  Running "pkg-static install -f pkg" recommended
Local package database:
    Installed packages: 172
    Disk space occupied: 737 MiB

Remote package database(s):
    Number of repositories: 1
    Packages available: 0
    Unique packages: 0
    Total size of packages: 0 B

~> pkg-static install -f pkg
pkg-static: Warning: Major OS version upgrade detected.  Running "pkg-static install -f pkg" recommended
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.
pkg-static: No packages available to install matching 'pkg' have been found in the repositories

~> pkg search nginx
pkg: Warning: Major OS version upgrade detected.  Running "pkg-static install -f pkg" recommended

~> pkg update
pkg: Warning: Major OS version upgrade detected.  Running "pkg-static install -f pkg" recommended
Updating FreeBSD repository catalogue...
FreeBSD repository is up-to-date.
All repositories are up-to-date.

there is NO /usr/local/etc/pkg/repos/FreeBSD.conf
just /etc/pkg/FreeBSD.conf

Code:
~> cat /etc/pkg/FreeBSD.conf
FreeBSD: {
  url: "pkg+http://pkg.FreeBSD.org/${ABI}/latest",
  mirror_type: "srv",
  signature_type: "fingerprints",
  fingerprints: "/usr/share/keys/pkg",
  enabled: yes
}

in /var/db/pkg I can see all the packages plus

Code:
-r--r--r--  1 root  wheel  3457122 Apr 19 03:19 vuln.xml
-rw-r--r--  1 root  wheel      246 May 17 17:03 FreeBSD.meta
-rw-r--r--  1 root  wheel    54272 May 17 17:03 repo-FreeBSD.sqlite
-rw-r--r--  1 root  wheel  7876608 May 18 10:39 local.sqlite


Any idea of how to proceed?

Thanks!!!!
 
Hi,

Thanks for the help!!!!

I end up doing the following:

Code:
~> /usr/sbin/pkg bootstrap -f
The package management tool is not yet installed on your system.
Do you want to fetch and install it now? [y/N]: y
Bootstrapping pkg from pkg+http://pkg.FreeBSD.org/freebsd:10:x86:64/latest, please wait...
Verifying signature with trusted certificate pkg.freebsd.org.2013102301... done
Installing pkg-1.5.2...
Extracting pkg-1.5.2: 100%
Message for pkg-1.5.2:
If you are upgrading from the old package format, first run:

  # pkg2ng

which installed the latest pkg-1.5.2 and then I issued a
Code:
~> pkg update -f
Updating FreeBSD repository catalogue...
Fetching meta.txz: 100%    944 B   0.9kB/s    00:01
Fetching packagesite.txz: 100%    5 MiB   1.8MB/s    00:03
Processing entries: 100%

FreeBSD repository update completed. 24035 packages processed.
~> pkg stats
Local package database:
    Installed packages: 172
    Disk space occupied: 739 MiB

Remote package database(s):
    Number of repositories: 1
    Packages available: 24035
    Unique packages: 24035
    Total size of packages: 43 GiB

After that I did pkg upgrade -f and it worked!!!
I did the final freebsd-update install and now I have rebooted to my shining brand new 10.1.

Thanks for your help!!!!!
 
This should fix the problem:

/usr/sbin/pkg bootstrap -f
Why is this command not in pkg help list !?
I used it several times for :
Code:
# pkg update
Shared object "libarchive.so.5" not found, required by "pkg"
after major freebsd-update(8)'s

Saving me from having to do:
Code:
fetch [URL]http://yoururl/90amd64-default/Latest/pkg.txz[/URL]
tar xf ./pkg.txz -s ",/.*/,,g" "*/pkg-static"
./pkg-static add ./pkg.txz
and having to search for the link to download from...
 
The /usr/sbin/pkg is the bootstrap program for installing ports-mgmt/pkg and is part of the base system as you can guess from the path. It is documented in the pkg(7) manual page that lists the bootstrap option. I'm not sure why pkg(7) repeats so much information from pkg(8). I would think the actual pkg port being rather moving target that the information in the first is in danger of going out of date fast.
 
Back
Top