I've typed ldconfig -v (Linux like command) under FreeBSD 7.1_P4_64 bit to get list of directories used by system. But I lost all my configuration and getting shared object not found errors for almost all commands such as vim or bash and so on. How do I fix this problem without rebooting the system?
FreeBSD's ldconfig binary does not work the same as the Linux. When you entered ldconfig -v, you lost all your configuration information loaded from the hints file.
The ldconfig utility is used to prepare a set of hints for use by the dynamic linker to facilitate quick lookup of shared libraries available in multiple directories. It scans a set of built-in system directories. To fix the problem, type the following command:
# /etc/rc.d/ldconfig restart
OR
# /etc/rc.d/ldconfig forcerestart
To list the current contents of the hints file on the screen, type:
# ldconfig -r
# ldconfig -r | less
Sample Output:
/var/run/ld-elf.so.hints:
search directories: /lib:/usr/lib:/usr/lib/compat:/usr/local/lib:/usr/local/lib/compat/pkg:/usr/local/lib/mysql:/usr/local/lib/pth
0:-lc.7 => /lib/libc.so.7
1:-lcrypt.4 => /lib/libcrypt.so.4
....
....
......
237:-lpth.20 => /usr/local/lib/pth/libpth.so.20
238:-lpthread.20 => /usr/local/lib/pth/libpthread.so.20
/var/run/ld-elf.so.hints is default FreeBSD hints file for the ELF dynamic linker stored at /libexec/ directory.
You should follow me on twitter here or grab rss feed to keep track of new changes.
Featured Articles:
- 30 Handy Bash Shell Aliases For Linux / Unix / Mac OS X
- Top 30 Nmap Command Examples For Sys/Network Admins
- 25 PHP Security Best Practices For Sys Admins
- 20 Linux System Monitoring Tools Every SysAdmin Should Know
- 20 Linux Server Hardening Security Tips
- Linux: 20 Iptables Examples For New SysAdmins
- Top 20 OpenSSH Server Best Security Practices
- Top 20 Nginx WebServer Best Security Practices
- 20 Examples: Make Sure Unix / Linux Configuration Files Are Free From Syntax Errors
- 15 Greatest Open Source Terminal Applications Of 2012

- My 10 UNIX Command Line Mistakes
- Top 10 Open Source Web-Based Project Management Software
- Top 5 Email Client For Linux, Mac OS X, and Windows Users
- The Novice Guide To Buying A Linux Laptop













{ 0 comments… add one now }