- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
我正在尝试在 python 中使用 netsnmp,但在遵循与 python 中的 netsnmp 相关的所有建议后,它无法导入。我使用以下命令安装了 netsnmp
yum install net-snmp net-snmp-utils
easy_install ipython
snmpd 服务正在运行。它仍然抛出这个错误
ImportError: No module named netsnmp
我使用的是 Cent os 6.5 和 Python 版本 2.6.6如果安装不正确或缺少任何其他配置,请提供帮助。
最佳答案
要在 python 中导入 netsnmp,只需 net-snmp-python 即可,同时可以删除 net-snmp net-snmp-utils。所以只是
yum install net-snmp-python
将在 Cent os 6.5 上将 netsnmp 库导入 python
yum install net-snmp net-snmp-utils
将从 Linux 终端启用 SNMP 查询。两者都可以独立工作。
关于python - 无法在 centos 6.5 的 python 中导入 netsnmp,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23259930/
我有一个简单的例子: import netsnmpvar = netsnmp.Varbind('ifHCInOctets','0')res = netsnmp.snmpgetnext(var,Vers
我正在尝试使用 snmpwalk 在某些界面上获取一些信息和统计数据。我用这个: import netsnmp serv = "172.16.1.1" snmp_pass = "private" oi
我正在尝试向 SNMP 代理添加新服务。我目前正在使用 SNMP v2 并且当前正在运行代理,但是,当我尝试使用 snmpwalk 发送请求时,出现以下错误:“此 OID 当前不存在此类实例”。我拥有
当我尝试运行 python 脚本时,收到“ImportError:没有名为 netsnmp 的模块”消息。有人可以帮我吗?我没有任何 python 脚本编写经验。 这是我想使用的 Icinga 插件脚
我从 net-snmp 库中得到一个 snmp get 错误 Operation not permitted error from sendto. 我想知道是什么导致 sendto(2) 系统调用失败
我正在尝试使用 netsnmp 中的 snmpset 来设置 Counter32 类型的 OID 值,但我不知道要指定哪种数据类型? 查看 ./snmpset -h 我看到以下内容: TYPE:
我收到此错误 fatal error: net-snmp/net-snmp-config.h: No such file or directory。我已经安装了 gcc、python-devel、ne
我使用的是 Debian 6.0 和 net-snmp 5.4.3。我有一个关于捕获系统上存在的以太网接口(interface)的 IP 地址和 MAC 地址的问题。在我的 SNMP 代理中,我必须弄
我在 centos 7 上安装了 python3,因为我应该开始将我的脚本从 python 2 移动到 3。 yum install python3 # rpm -qa |grep python3 p
我正在尝试在 python 中使用 netsnmp,但在遵循与 python 中的 netsnmp 相关的所有建议后,它无法导入。我使用以下命令安装了 netsnmp yum install net-
我在 Ubuntu 上成功编译了 net-snmp-5.7.3。 :D 这是 Ubuntu 的特定版本: Linux loserBox 3.13.0-32-generic #57-Ubuntu SMP
我是一名优秀的程序员,十分优秀!