Bug 213397 - Upgrade from 10.3 to 11.0 leaves pkg broken
Summary: Upgrade from 10.3 to 11.0 leaves pkg broken
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: misc (show other bugs)
Version: 11.0-STABLE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pkg (Nobody)
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2016-10-12 00:20 UTC by Michael Bushey
Modified: 2017-01-19 19:57 UTC (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Bushey 2016-10-12 00:20:33 UTC
After running the following commands

# freebsd-update upgrade -r 11.0-RELEASE
# freebsd-update install (reboot & again)

The system can no longer use pkg:

root@freebsd:~ # pkg update
Shared object "libssl.so.7" not found, required by "pkg"

I tried:
root@freebsd:~ # ln -s /usr/lib/libssl.so.8 /usr/lib/libssl.so.7
root@freebsd:~ # pkg update
Shared object "libcrypto.so.7" not found, required by "pkg"

root@ygg:~ # ln -s /usr/lib/libcrypto.so /usr/lib/libcrypto.so.7
root@ygg:~ # pkg update
Shared object "libelf.so.1" not found, required by "pkg"

What a mess... This is an almost unmodified install.
Comment 1 Shawn Webb 2016-10-12 00:23:06 UTC
As a workaround, you could use pkg-static instead of pkg.
Comment 2 Michael Bushey 2016-10-12 05:12:29 UTC
(In reply to Shawn Webb from comment #1)

Awesome, thank you! After "pkg-static update" it replied

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

Which I did and the problem is now resolved. Thanks again. :)
Comment 3 Jan Bramkamp 2016-10-12 12:08:25 UTC
This looks like you deleted the old shared libs before you updated the binaries using them. Your upgrade path should install the new kernel and world, upgrade the ports/packages and delete the old libs last.
Comment 4 Franco Fichtner 2016-10-12 12:26:42 UTC
It would be quite the approach to tell that to people running these commands on the command line.  ;)

# freebsd-update install
This upgrade step will delete obsolete shared library files.  If you are using
binary packages, you must run 'pkg-upgrade -f' before continuing.  The package
manager can also be recovered later by running 'pkg bootstrap -f'.

Continue? [y/N]:
Comment 5 Baptiste Daroussin freebsd_committer freebsd_triage 2017-01-07 20:57:29 UTC
for the record pkg boostrap -f would have also solved the problem