pkg delete <xyz> caused dependency issues

I was trying to downgrade node.
I did pkg delete node and pkg install node-<ver>

But not I cannot do anything.
root@z48021:# ssh
Shared object "libldns.so.3" not found, required by "ssh"
root@z48021:# scp
Shared object "libldns.so.3" not found, required by "scp"
root@z48021:# vim
Shared object "libintl.so.8" not found, required by "vim"



root@z48021:# ldconfig -r
/var/run/ld-elf.so.hints:
search directories:


Temporary solution: export LD_LIBRARY_PATH=/usr/local/lib

But before I never has to do that.
How to fix it?
 
(07:31:24)z48021-~> service ldconfig start
Code:
(07:57:48)z48021-~> service ldconfig start
ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat /usr/local/lib/compat/pkg /usr/local/lib/gcc8 /usr/local/lib/heimdal /usr/local/lib/perl5/5.32/mach/CORE
ldconfig: /usr/local/lib: ignoring world-writable directory
32-bit compatibility ldconfig path: /usr/lib32 /usr/local/lib32/compat


The lib directory was not owned by root before, so i chown it to root. After that I get the above message. `ignoring world-writable directory`
Code:
07:52:40)z48021-~> ls -lrt /usr/local/
drwxrwxrwx  39 root  1001   32256 Dec 22 05:00 lib
drwxr-xr-x  11 root  wheel   1024 Dec 22 05:00 libexec
drwxr-xr-x  29 root  wheel   1536 Dec 22 05:00 etc
drwxr-xr-x  78 1001  1001    1536 Dec 22 05:00 share
drwxr-xr-x   3 1001  1001   18432 Dec 22 05:00 bin
 
The lib directory was not owned by root before
Looks like you royally screwed up the permissions and ownership of the base OS files. Nothing should be owned by the user or group 1001 (which is the first available user ID). Looks like you chmod 777 various directories too.
 
Back
Top