2

I'm running OSX ElCapitan and I've brew install easysnmp... nevertheless, when I try to import it on python, I get the following error:

Python 2.7.12 (default, Jun 29 2016, 14:05:02) 
[GCC 4.2.1 Compatible Apple LLVM 7.3.0 (clang-703.0.31)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>>
>>> from easysnmp import Session
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/local/lib/python2.7/site-packages/easysnmp/__init__.py", line 1, in <module>
    from .easy import (  # noqa
  File "/usr/local/lib/python2.7/site-packages/easysnmp/easy.py", line 3, in <module>
    from .session import Session
  File "/usr/local/lib/python2.7/site-packages/easysnmp/session.py", line 8, in <module>
    from . import interface
ImportError: dlopen(/usr/local/lib/python2.7/site-packages/easysnmp/interface.so, 2): Symbol not found: _netsnmp_transport_config_compare
  Referenced from: /usr/local/lib/python2.7/site-packages/easysnmp/interface.so
  Expected in: flat namespace
 in /usr/local/lib/python2.7/site-packages/easysnmp/interface.so    

easysnmp sites state that it requires net-snmp 5.7 although el capitan is shipped with 5.6... so I've "brew installed" snmp-get 5.7.

Brew doesn't change the symlinks so I'm assuming python is still looking at version 5.6.

Install output :

==> make
==> make install
==> Caveats
This formula is keg-only, which means it was not symlinked into /usr/local.
OS X already provides this software and installing another version in
the parallel can cause all kinds of trouble.
Generally there are no consequences of this for you. If you build your
own software and it requires this formula, you'll need to add to your
build variables:
    LDFLAGS:  -L/usr/local/opt/net-snmp/lib
    CPPFLAGS: -I/usr/local/opt/net-snmp/include
==> Summary
  /usr/local/Cellar/net-snmp/5.7.3: 538 files, 12.8M, built in 4 minutes 34 seconds
Benyamin Jafari
  • 27,880
  • 26
  • 135
  • 150
Voltaire
  • 21
  • 4

0 Answers0