Search My Techie Guy

Monday, November 24, 2014

ld.so.1: snmpwalk: fatal: libgcc_s.so.1: open failed: No such file or directory Killed

I had just finished installing net-snmp on one of my old DNS server to help me monitor it remotely using cacti but i ran into this error while trying to test it using snmpwalk.

Problem:

# snmpwalk -V
ld.so.1: snmpwalk: fatal: libgcc_s.so.1: open failed: No such file or directory
Killed


Solution:

1. I ran a search to try and find this library, and yes libgcc was already installed on my server:

# find / -name libgcc*
/usr/local/lib/libgcc_s.so
/usr/local/lib/libgcc_s.so.1

2. So i checked my library PATH, and the path to libgcc wasn't there:

# echo $LD_LIBRARY_PATH
/usr/openwin/lib


3. I added it:

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib

4. Check again:

# echo $LD_LIBRARY_PATH
/usr/local/lib:/usr/openwin/lib


5. Test snmpwalk again:

# snmpwalk -V
NET-SNMP version: 5.4.4

6. To make the library PATH persistent, do the following:
Edit the /etc/profile file:

  • vi /etc/profile
Add this line at the bottom, depending on your system's library PATH:
  • LD_LIBRARY_PATH=/usr/local/lib:/usr/openwin/lib
Run this command to update the system environment PATH:
  • source /etc/profile 
Test:
  •  #echo $LD_LIBRARY_PATH

No comments: