# getting ERROR /usr/libexec/ld-elf.so.1: Shared object "libsnmp.so.4" not found,



## akshay_aradhye (Feb 12, 2009)

Hi I am doing snmpwalk to a router.

The environment variables are set properly.

While doing snmpwalk i am getting following error.

<freeBSD system name># snmpwalk -Os <router name> public <object ID>
/usr/libexec/ld-elf.so.1: Shared object "libsnmp.so.4" not found, required by "snmpwalk"

I am using 6.1-RELEASE.

Help on getting rid of this problem


----------



## Mel_Flynn (Feb 12, 2009)

Please provide output of:
ldconfig -r|grep libsnmp


----------



## akshay_aradhye (Feb 16, 2009)

*out put*

<hostname># ldconfig -r|grep libsnmp
<hostname>#


----------



## Mel_Flynn (Feb 18, 2009)

How did you install this software? My snmpwalk doesn't need libsnmp.so.4:

```
$ ldd -a `which snmpwalk`
/usr/local/bin/snmpwalk:
        libnetsnmp.so.16 => /usr/local/lib/libnetsnmp.so.16 (0x3807e000)
        libcrypto.so.5 => /lib/libcrypto.so.5 (0x3812b000)
        libelf.so.1 => /usr/lib/libelf.so.1 (0x38286000)
        libm.so.5 => /lib/libm.so.5 (0x382a6000)
        libkvm.so.4 => /lib/libkvm.so.4 (0x382bb000)
        libdevstat.so.6 => /lib/libdevstat.so.6 (0x382c3000)
        libc.so.7 => /lib/libc.so.7 (0x382c8000)
/usr/local/lib/libnetsnmp.so.16:
        libcrypto.so.5 => /lib/libcrypto.so.5 (0x3812b000)
        libc.so.7 => /lib/libc.so.7 (0x382c8000)
/lib/libcrypto.so.5:
        libc.so.7 => /lib/libc.so.7 (0x382c8000)
/usr/lib/libelf.so.1:
        libc.so.7 => /lib/libc.so.7 (0x382c8000)
/lib/libm.so.5:
        libc.so.7 => /lib/libc.so.7 (0x382c8000)
/lib/libkvm.so.4:
        libc.so.7 => /lib/libc.so.7 (0x382c8000)
/lib/libdevstat.so.6:
        libkvm.so.4 => /lib/libkvm.so.4 (0x382bb000)
        libc.so.7 => /lib/libc.so.7 (0x382c8000)
```


----------



## r-c-e (Feb 18, 2009)

try this:


```
locate libsnmp.so.4
ldconfig -m /path/to/directory/its/in
```

if that fails try locating libsnmp.so, you may have an earlier version, in this case, update libs (recommended) or symlink earlier lib to later lib name and then ldconfig (not recommended)


----------



## Mel_Flynn (Feb 18, 2009)

Ah, think I found it:
net-mgmt/net-snmp4 installs libsnmp.so.4.

Somehow your snmpwalk is from net-mgmt/net-snmp4 but the rest of it is gone. Can you show:
ls /var/db/pkg|grep snmp


----------

