# Upgrading 11.1 - 12.0 loss of  lib.so.1



## redsmeg68 (Aug 11, 2019)

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 ?


----------



## SirDice (Aug 12, 2019)

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.


----------



## redsmeg68 (Aug 12, 2019)

yeah I don't normally login as root 

Also how do I know what was previously installed so that I re-install those items ?


----------



## SirDice (Aug 12, 2019)

You don't need to know, a `pkg upgrade -f` will reinstall everything.


----------



## redsmeg68 (Aug 12, 2019)

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


freebsd-update fetch install
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 ?


----------



## SirDice (Aug 12, 2019)

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.


----------



## redsmeg68 (Aug 12, 2019)

ok thanks for the great answers.

I did also do that step prior to reboot.

3. freebsd-update -r 12.0-RELEASE upgrade

following this article process. (https://www.cyberciti.biz/open-source/freebsd-12-released-here-is-how-to-upgrade-freebsd/)


----------



## SirDice (Aug 12, 2019)

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.











						FreeBSD 12.0-RELEASE Installation Instructions
					

FreeBSD is an operating system used to power modern servers, desktops, and embedded platforms.




					www.freebsd.org


----------



## redsmeg68 (Aug 12, 2019)

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.


----------



## SirDice (Aug 12, 2019)

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.


----------

