安装net-snmp依赖包

   ps:尝试使用apt-get  可惜由于依赖问题,不能安装只能下载包了


wget http://launchpadlibrarian.net/134564437/libperl-dev_5.14.2-6ubuntu2.3_amd64.deb

sudo dpkg -i libperl-dev_5.14.2-6ubuntu2.3_amd64.deb

sudo ldconfig


wget http://superb-dca2.dl.sourceforge.net/project/net-snmp/net-snmp/5.7.1/net-snmp-5.7.1.tar.gz

tar zxvf net-snmp-5.7.1.tar.gz

cd net-snmp-5.7.1

./configure

make && make install


cd python

sudo python setup.py install


安装完毕后测试netsnmp


In [1]: import netsnmp

/usr/local/lib/python2.7/dist-packages/setuptools-0.8-py2.7.egg/pkg_resources.py:1054: UserWarning: /home/songtao/.python-eggs is writable by group/others and vulnerable to attack when used with get_resource_filename. Consider a more secure location (set with .set_extraction_path or the PYTHON_EGG_CACHE environment variable).


解决办法


chmod g-wx,o-wx .python-eggs/