3

I just installed net-snmp on Ubuntu 16.04 from sources using this tutorial (downloaded 5.7 patch), and when calling

$ snmpget --version
NET-SNMP version 5.7.3
$ whereis snmpd
snmpd: /usr/local/sbin/snmpd

so it has been installed. However, when I want to check if snmpd is running

sudo service snmpd status

it returns Loaded: not-found (Reason: No such file or directory) Active: inactive (dead). When I try to start snmpd

sudo service snmpd start

it returns Failed to start snmpd.service: Unit snmpd.service not found. When starting it directly from command line

$ snmpd
snmpd: symbol lookup error: snmpd: Undefined symbol: netsnmpd_close_fds

The other problem is that the /etc/snmp/ directory does not exist, which should contain the snmpd.conf file that I need to edit.

I never had these kinds of problems when I was using the

sudo apt-get install snmpd

but I must use sources to configure the installation with options that do not come with the 'apt-get' installation. What am I doing wrong?

Nazar
  • 155

1 Answers1

0

Remove the snmp:

sudo apt-get -y autoremove snmp

Install again like this:

sudo apt-get update -y
sudo apt-get upgrade -y

Remove any unnecessary files shown in the system:

apt-get install snmpd
cat /etc/snmp/snmpd.conf
systemctl restart snmpd
systemctl enable snmpd
systemctl status snmpd
zx485
  • 2,426