# Question on missing lib after update.



## Smok (Aug 7, 2018)

Greetings. I run FreeBSD on Intel NUC. Recently, I've updated from Release version 11.1 to 11.2. The update went smoothly but 
after the update, I ran into an issue with certain libs being reported missing. 
When running command 'pkg'  I get a response:

Shared object "libpkg.so.3" not found, required by "pkg"

When running command to invoke python, I get a response:

Shared object "libintl.so.8" not found, required by "python"

Any ideas what happened to these libs and how to recover them?


----------



## SirDice (Aug 7, 2018)

Odd. None of those libraries are actually part of the base OS. So they shouldn't be changed when you upgraded. 

Try and fix pkg(8) first with: `pkg-static install -f pkg`


----------



## Smok (Aug 7, 2018)

I had to properly chflag the pkg in order to reinstall it. It was secured from deletion. Now the new version works fine. 
However, after reinstalling python and running ldd on it, it still reports the libintl.so.8 missing.


----------



## SirDice (Aug 7, 2018)

Smok said:


> However, after reinstalling python and running ldd on it, it still reports the libintl.so.8 missing.


Useful command to sort these things out:

```
root@maelcum:~ # pkg which /usr/local/lib/libintl.so.8
/usr/local/lib/libintl.so.8 was installed by package gettext-runtime-0.19.8.1_1
```
Based on that, try `pkg install -f gettext-runtime`

You can also run an automated check using pkg-check(8).


----------



## Smok (Aug 8, 2018)

Is it normal that packages installed via pkg (including the pkg itself) end up in /usr/local ?
Generally, the system packages on linux end up in /usr


----------



## ShelLuser (Aug 8, 2018)

Smok said:


> Is it normal that packages installed via pkg (including the pkg itself) end up in /usr/local ?


Yes, that's normal.

Seriously: it helps to read the FreeBSD handbook, that way you'll learn about these basic facts.



Smok said:


> Generally, the system packages on linux end up in /usr


The FreeBSD base system is a totally separate setup from general package management. Unlike with Linux you cannot disrupt the base system by removing the wrong package(s). Therefor nothing gets installed "within" the base system because it has no place there. As such: /usr/local.


----------



## SirDice (Aug 8, 2018)

Smok said:


> Is it normal that packages installed via pkg (including the pkg itself) end up in /usr/local ?


It's actually mandatory, so yes, it's normal. 



Smok said:


> Generally, the system packages on linux end up in /usr


Generally speaking Linux is only a kernel and nothing else. FreeBSD is a complete OS.


----------

