Snmp-CentOS install Net-SNMP Subtotal

Source: Internet
Author: User
Tags snmp install perl

Snmp-CentOS install Net-SNMP Subtotal

Net-snmp is a software.

Then, my goal is to first install net-snmp to CentOS, and then import the netsnmp module used by python.

That is:

For the ultimate goal

---------------------------------------------

Download the net-snmp source code from the official website, and then

./Congficure

Make

Make install

It is worth noting that an error occurs during CentOS installation:

Can't locate ExtUtils/MakeMaker.pm in @INC (@INC contains: /usr/local/lib64/perl5/usr/local/share/perl5 /usr/lib64/perl5/vendor_perl /usr/share/perl5/vendor_perl /usr/lib64/perl5 /usr/share/perl5.) at Makefile.PL line 1.BEGIN failed--compilation aborted at Makefile.PL line 1.make: *** [perlmakefiles] ERROR 2
My solution is:
yum install perl-ExtUtils-CBuilder perl-ExtUtils-MakeMaker
--------------------------------

Directly after make install:

Cd python

Python setup. py build

Python setup. py test

Here, during python setup. py build, my system is python3.4 by default, and an error occurs during build (python2.7 won't make an error. It seems that 3.4 is more strict with indentation)

TabError: inconsistent use of tabs and spaces in indentation 

Then I checked the setup. py file and found that one line (14 rows) was indented by tab instead of four spaces. Haha, is this a bug?

Then, an error occurs during python setup. py test:

ImportError: libnetsnmp.so.30: cannot open shared object file: No such file or directory

Net-snmp is compiled and installed by default, so its files are scattered, and some of them are in/usr/local/lib.

This part is the cause of the error. The solution is as follows:

echo "/usr/local/netsnmp/lib" >> /etc/ld.so.confldconfig

Then

Python setup. py install

After installing the python module, the beginning of the article will be displayed.

DONE.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.