On one of the machines at work, we had Net-SNMP 5.2.3 installed, and I wanted to upgrade that to 5.4.2.1. So I downloaded the tar file, extracted it, did the configure, make, make test, make install, and everything worked.
All the executable files (like snmpget, snmpset, snmpwalk) got copied to /usr/local/bin, which is good, but there seems to be a problem with the PATH.
When I type "env", I see that my PATH is set to the following:
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
And the only files in /usr/local/sbin are snmpd and snmptrapd.
When I run "snmpget --version", it says:
NET-SNMP version: 5.2.3
But when I run "/usr/local/bin/snmpget --version", it says:
NET-SNMP version: 5.4.2.1
When I run "which snmpget", it says:
/usr/local/bin/snmpget
Huh? This makes no sense to me. If the "which" command says I will be running the snmpget in /usr/local/bin, then why does the "snmpget --version" command indicate that it's running the older version from somewhere else?
---------- Post updated at 02:59 PM ---------- Previous update was at 02:10 PM ----------
OK I fixed the problem by rebooting the system. I didn't think it'd be like Windows where you have to reboot after installing something...