無法安裝 ubuntu 16.04 的 net-snmp:收到錯誤

無法安裝 ubuntu 16.04 的 net-snmp:收到錯誤

我已經嘗試了幾次,但無法在 Ubuntu 16.04i 上安裝 net-snmp,根本無法理解問題所在。非常歡迎任何幫助:

net-snmp 目錄名稱:

網路-snmp-5.7.3+dfsg

output of ./configure

---------------------------------------------------------
            Net-SNMP configuration summary:
---------------------------------------------------------

  SNMP Versions Supported:    1 2c 3
  Building for:               linux
  Net-SNMP Version:           5.7.3
  Network transport support:  Callback Unix Alias TCP UDP IPv4Base SocketBase TCPBase UDPIPv4Base UDPBase
  SNMPv3 Security Modules:     usm
  Agent MIB code:            default_modules =>  snmpv3mibs mibII ucd_snmp notification notification-log-mib target agent_mibs agentx disman/event disman/schedule utilities host
  MYSQL Trap Logging:         unavailable
  Embedded Perl support:      disabled
  SNMP Perl modules:          building -- not embeddable
  SNMP Python modules:        disabled
  Crypto support from:        crypto
  Authentication support:     MD5 SHA1
  Encryption support:         DES AES
  Local DNSSEC validation:    disabled


Error Received :
/usr/bin/ld: cannot find -lperl
collect2: error: ld returned 1 exit status
Makefile:976: recipe for target 'libnetsnmpagent.la' failed
make[1]: *** [libnetsnmpagent.la] Error 1
make[1]: Leaving directory '/home/siaetest/net-snmp-5.7.3+dfsg/agent'
Makefile:852: recipe for target 'installsubdirlibs' failed
make: *** [installsubdirlibs] Error 1


sudo apt-cache search net-snmp
libnet-snmp-perl - Script SNMP connections
libsnmp-base - SNMP configuration script, MIBs and documentation
libsnmp-dev - SNMP (Simple Network Management Protocol) development files
libsnmp30 - SNMP (Simple Network Management Protocol) library
libsnmp30-dbg - SNMP (Simple Network Management Protocol) library debug
snmp - SNMP (Simple Network Management Protocol) applications
snmpd - SNMP (Simple Network Management Protocol) agents
libsnmp-extension-passpersist-perl - Generic pass/pass_persist extension framework for Net-SNMP
libsnmp-perl - SNMP (Simple Network Management Protocol) Perl5 support
python-netsnmp - SNMP (Simple Network Management Protocol) Python support
ruby-snmp - simple network management protocol bindings for ruby
snmptrapd - Net-SNMP notification receiver
snmptt - SNMP trap handler for use with snmptrapd
tkmib - SNMP (Simple Network Management Protocol) MIB browser

答案1

我已經透過正常方式解決了這個問題:

./configure

make

sudo make install 

然後我輸入 snmpget --version

我得到回應“NET-SNMP版本:5.7.3”

主要是透過使用 ln -s /usr/lib/libperl.so.5.22 /usr/lib/libperl.so 手動建立符號連結來解決該問題,並且它連結正確。

請閱讀以下有用的連結:

https://stackoverflow.com/questions/17576911/cannot-find-lperl-doing-a-makefile-on-c

感謝大家的努力

答案2

/usr/bin/ld: 找不到 -lperl

這是連結器,抱怨它找不到 perl 函式庫。

若要安裝 perl 庫,請執行sudo apt install libperl-devel.

但由於您沒有網路連接,這可能是不可能的。您可以從以下位置下載該軟體包這裡,但它必須與其他已安裝的 perl 軟體包相符 - 在離線系統中需要進行一些追蹤。

您寫道您的計算機位於 DMZ 中。您應該配置某種方式讓機器存取互聯網、取得更新和安裝軟體。這可以透過apt代理,它的行為就像本地鏡像,沒有鏡像所有不需要的包的開銷。

在無法存取更新的情況下運行電腦被認為是一種安全風險 - 正如您所發現的,這會使安裝軟體變得更加困難。

相關內容