ubuntu php 出现 Cannot find module (SNMPv2-TC) 等错误
有时编译一个东西或输入某个命令的时候会出现:
1 Cannot find module (MTA-MIB): At line 0 in (none) 2 Cannot find module (NETWORK-SERVICES-MIB): At line 0 in (none) 3 Cannot find module (SNMPv2-TC): At line 15 in /usr/share/snmp/mibs/UCD-DISKIO-MIB.txt 4 Did not find 'DisplayString' in module #-1 (/usr/share/snmp/mibs/UCD-DISKIO-MIB.txt) 5 Did not find 'ucdExperimental' in module UCD-SNMP-MIB (/usr/share/snmp/mibs/UCD-DISKIO-MIB.txt) 6 Unlinked OID in UCD-DISKIO-MIB: ucdDiskIOMIB ::= { ucdExperimental 15 } 7 Undefined identifier: ucdExperimental near line 19 of /usr/share/snmp/mibs/UCD-DISKIO-MIB.txt 8 Cannot find module (SNMPv2-TC): At line 15 in /usr/share/snmp/mibs/LM-SENSORS-MIB.txt 9 Did not find 'DisplayString' in module #-1 (/usr/share/snmp/mibs/LM-SENSORS-MIB.txt) 10 Did not find 'ucdExperimental' in module UCD-SNMP-MIB (/usr/share/snmp/mibs/LM-SENSORS-MIB.txt) 11 Unlinked OID in LM-SENSORS-MIB: lmSensors ::= { ucdExperimental 16 } 12 Undefined identifier: ucdExperimental near line 32 of /usr/share/snmp/mibs/LM-SENSORS-MIB.txt 13 Cannot find module (HOST-RESOURCES-MIB): At line 0 in (none) 14 Cannot find module (HOST-RESOURCES-TYPES): At line 0 in (none) 15 Cannot find module (SNMPv2-MIB): At line 0 in (none) 16 Cannot find module (IF-MIB): At line 0 in (none) 17 Cannot find module (IP-MIB): At line 0 in (none) 18 Cannot find module (TCP-MIB): At line 0 in (none) 19 Cannot find module (UDP-MIB): At line 0 in (none) 20 Cannot find module (NOTIFICATION-LOG-MIB): At line 0 in (none) 21 Cannot find module (DISMAN-EVENT-MIB): At line 0 in (none) 22 Cannot find module (DISMAN-SCHEDULE-MIB): At line 0 in (none) 23 Did not find 'ucdavis' in module UCD-SNMP-MIB (/usr/share/snmp/mibs/UCD-DEMO-MIB.txt) 24 Unlinked OID in UCD-DEMO-MIB: ucdDemoMIB ::= { ucdavis 14 } 25 Undefined identifier: ucdavis near line 7 of /usr/share/snmp/mibs/UCD-DEMO-MIB.txt 26 Cannot find module (SNMP-TARGET-MIB): At line 0 in (none) 27 Cannot find module (SNMP-FRAMEWORK-MIB): At line 9 in /usr/share/snmp/mibs/NET-SNMP-AGENT-MIB.txt 28 Cannot find module (SNMPv2-SMI): At line 8 in /usr/share/snmp/mibs/NET-SNMP-MIB.txt 29 Did not find 'enterprises' in module #-1 (/usr/share/snmp/mibs/NET-SNMP-MIB.txt) 30 Unlinked OID in NET-SNMP-MIB: netSnmp ::= { enterprises 8072 }
以为少了什么模块,看网上有人贴出这样的答案:
sudo apt-get remove php5-snmp
是 remove 掉了snmp模块,这样就不会出现,不过会不会出现后续的 bug 还需验证
you are the best!
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· AI与.NET技术实操系列:基于图像分类模型对图像进行分类
· go语言实现终端里的倒计时
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 分享一个免费、快速、无限量使用的满血 DeepSeek R1 模型,支持深度思考和联网搜索!
· 25岁的心里话
· 基于 Docker 搭建 FRP 内网穿透开源项目(很简单哒)
· ollama系列01:轻松3步本地部署deepseek,普通电脑可用
· 按钮权限的设计及实现
2015-01-22 a href=#与 a href=javascript:void(0) 的区别