1. 程式人生 > >問題處理:Cannot find module (SNMPv2-TC): At line 10 in /usr/share/snmp/mibs/UCD-DLMOD-MIB.txt

問題處理:Cannot find module (SNMPv2-TC): At line 10 in /usr/share/snmp/mibs/UCD-DLMOD-MIB.txt

在執行  php -i |grep redis 時顯示以下報錯資訊(但在phpinfo檢視時一切正常):

MIB search path: /root/.snmp/mibs:/usr/share/snmp/mibs:/usr/share/snmp/mibs/iana:/usr/share/snmp/mibs/ietf:/usr/share/mibs/site:/usr/share/snmp/mibs:/usr/share/mibs/iana:/usr/share/mibs/ietf:/usr/share/mibs/netsnmp
Cannot find module (SNMPv2-TC): At line 10 in /usr/share/snmp/mibs/UCD-DLMOD-MIB.txt
Cannot find module (SNMPv2
-SMI): At line 34 in /usr/share/snmp/mibs/UCD-SNMP-MIB.txt Cannot find module (SNMPv2-TC): At line 37 in /usr/share/snmp/mibs/UCD-SNMP-MIB.txt Did not find 'enterprises' in module #-1 (/usr/share/snmp/mibs/UCD-SNMP-MIB.txt) Did not find 'DisplayString' in module #-1 (/usr/share/snmp/mibs/UCD-SNMP-MIB.txt) Did not find
'TruthValue' in module #-1 (/usr/share/snmp/mibs/UCD-SNMP-MIB.txt)
....

在網上好多有建議直接執行 sudo apt-get remove php5-snmp 刪掉該擴充套件來解決的。

但,我是需要此擴充套件的啊。。。

這個問題時因為我們安裝時執行 apt-get install php5-snmp ,少了php5-snmp必要的snmp,所以執行下面操作來安裝擴充套件搞定!

sudo apt-get install snmp

Done!

 

參考:http://qaru.site/questions/75652/ubuntu-typing-php-in-terminal-shows-a-lot-of-errors