Bug 239498 - Upgrade instructions from 11.3 to 12.0 result in break of pkg utility
Summary: Upgrade instructions from 11.3 to 12.0 result in break of pkg utility
Status: Closed FIXED
Alias: None
Product: Documentation
Classification: Unclassified
Component: Website (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: Sergio Carlavilla Delgado
Depends on:
Reported: 2019-07-28 17:06 UTC by Pablo Brasero
Modified: 2020-01-12 10:02 UTC (History)
3 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Pablo Brasero 2019-07-28 17:06:09 UTC
The upgrade process described at https://www.freebsd.org/releases/12.0R/installation.html#upgrade breaks the pkg utility.

To reproduce:

1. Install FreeBSD 11.3-RELEASE.
2. Follow the process to upgrade to 12.0-RELEASE as described at https://www.freebsd.org/releases/12.0R/installation.html#upgrade
3. After completing the process log back into the newly-upgraded system.
4. Use the pkg utility.

Expected outcome:

* I should be able to install/etc binary packages with pkg.

Actual outcome:

* Error message: `ld-elf.so.1: Shared object "libarchive.so.6" not found, required by "pkg"`


* Run `pkg-static install -f pkg` to upgrade the utility without relying on the removed version of the libarchive library.


* Mention this at https://www.freebsd.org/releases/12.0R/installation.html#upgrade, please :-)
Comment 1 Cory Albrecht 2019-09-04 00:51:20 UTC
I have the same problem on a DigitalOcean VPS that was originall 11.2, upgraded to 11.3 then to 12.0, the could not do 'pkg update'. Having to run pkg-static shoul dnot be necessary as that should be one of the tasks done by running freebsd-update.

root@db1:/etc # pkg update
ld-elf.so.1: Shared object "libarchive.so.6" not found, required by "pkg"
root@db1:/etc # pkg-static install -f pkg
pkg-static: Warning: Major OS version upgrade detected.  Running "pkg-static install -f pkg" recommended
Updating poudriere repository catalogue...
pkg-static: Repository poudriere has a wrong packagesite, need to re-create database
Fetching meta.txz: 100%    1 KiB   1.3kB/s    00:01    
Fetching packagesite.txz: 100%   82 KiB  84.4kB/s    00:01    
Processing entries: 100%
poudriere repository update completed. 278 packages processed.
All repositories are up to date.
The following 1 package(s) will be affected (of 0 checked):

Installed packages to be REINSTALLED:
	pkg-1.11.1 [poudriere] (ABI changed: 'freebsd:11:x86:64' -> 'freebsd:12:x86:64')

Number of packages to be reinstalled: 1

3 MiB to be downloaded.

Proceed with this action? [y/N]: y
[1/1] Fetching pkg-1.11.1.txz: 100%    3 MiB   3.4MB/s    00:01    
Checking integrity... done (0 conflicting)
[1/1] Reinstalling pkg-1.11.1...
[1/1] Extracting pkg-1.11.1: 100%
root@db1:/etc # pkg update
Updating poudriere repository catalogue...
Comment 2 Dewayne 2019-09-09 12:42:44 UTC
(In reply to Pablo Brasero from comment #0)
Yes, I was caught by the same issue, with 12.0S a few days ago (its now PRERELEASE)

Its a LOT worse when you pull the sources and build in an isolated environment.  There is no pkg-static!  Why?  Because you're expected to be network connected and run /usr/bin/pkg which then pulls binaries down.

I found it odd when I did try /usr/bin/pkg (yes, I'm naughty) because it sought 
(apologies if its https, but I'm using hand notes due to the secure env).

Pulling binaries from what look like phishing addresses, someone has a sense of humour.
Comment 3 commit-hook freebsd_committer 2020-01-07 18:47:31 UTC
A commit references this bug:

Author: carlavilla
Date: Tue Jan  7 18:46:47 UTC 2020
New revision: 53764
URL: https://svnweb.freebsd.org/changeset/doc/53764

  Upgrade FreeBSD 12.0 and 12.1 installation notes to reflect the pkg tool issue

  PR:		239498
  Submitted by:	pablo@pablobm.com
  Patch by:	carlavilla@
  Approved by:	bcr@(mentor), gjb@
  Differential Revision:	https://reviews.freebsd.org/D22949

Comment 4 Sergio Carlavilla Delgado freebsd_committer 2020-01-12 10:02:22 UTC
Fixed! Thanks!