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: New
Alias: None
Product: Documentation
Classification: Unclassified
Component: Website (show other bugs)
Version: Latest
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-doc mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-28 17:06 UTC by Pablo Brasero
Modified: 2019-09-09 12:42 UTC (History)
2 users (show)

See Also:


Attachments

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"`

Fix:

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

Suggestion:

* 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 
http://FreeBSD-repository.JdeBP.info/Latest/pkg.txz
(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.