Net-snmp Python Bindings

UPDATE 28/06/10: added –libdir=/usr/lib64 –enable-shared otherwise shared libs are not built at all!

Having spent a few hours trying to get this working on CentOS 5.4 x64 I am posting this blog entry for others to reference:

Download and complie net-snmp >=

./configure --with-python-modules --libdir=/usr/lib64 --enable-shared
make && make install
cd /path/to/net-snmp-src/python/
python ./ build
python ./ test

You may get ImportError:, this is due to x64 build creating as /usr/lib64/

ln -s /usr/lib64/ /usr/lib64/
python ./ install

And you are done, you can now use the netsnmp python bindings, I’d recomend seeing the examples here: