Upgrading 11.1 - 12.0 loss of lib.so.1

Upgraded from 11.1 - 12.0 and then it couldn't login has error.

Shared object "libdl.so.1" not found, required by "bash"

Thankfully I just restored the VM snapshot but how can I avoid this problem ?
 
Don't change root's shell. And after a major version upgrade you need to re-install everything, and this is exactly the reason why you need to do that.
 
yeah I don't normally login as root

Also how do I know what was previously installed so that I re-install those items ?
 
You don't need to know, a pkg upgrade -f will reinstall everything.
 
So I ran a pkg version (pkg info) and got a list of installed packages. When I ran the update to the OS I ran

  1. freebsd-update fetch install
  2. pkg update && pkg upgrade
Ironicaly I then got a list of packages that would be upgraded which included

bash: 4.4.12_2 -> 5.0.7.

and then

[71/72] Upgrading bash from 4.4.12_2 to 5.0.7...
[71/72] Extracting bash-5.0.7: 100%

What am I missing as all of the installed packages were being upgraded ?
 
1) only fetches and installs security updates, it does not do a version upgrade. You need to use freebsd-update -r 12.0-RELEASE upgrade if you want to upgrade to 12.0-RELEASE.

After a major version upgrade you need to reinstall all packages because the ones you have installed are linked to 11.x-RELEASE.
 
You skipped the last step:
Now base system has been updated. It is time to update all binary packages too. Simply run the following pkg command:
pkg-static install -f pkg
pkg update
pkg upgrade


At this point, users of systems being upgraded from earlier FreeBSD releases will be prompted by freebsd-update(8) to rebuild all third-party applications (e.g., ports installed from the ports tree) due to updates in system libraries.
 
Yes as I couldn't login after the reboot. I will chsh my user name back to csh or sh and that way I will be able to get back in after the reboot and continue the process.
 
Ideally you should do this from the console, KVM switch, IPMI or something similar. Then it's not a problem as you can simply login as root on a console. You can also catch boot issues that way.

When I run upgrades remotely I simply don't reboot until I'm completely done with installing and updating. But it's not something I would recommend doing because you can easily end up with a completely hosed system that way.
 
Back
Top