Ubuntu 16.04 の net-snmp をインストールできません: エラーが発生しました

Ubuntu 16.04 の net-snmp をインストールできません: エラーが発生しました

何度か試しましたが、Ubuntu 16.04 に net-snmp をインストールできません。何が問題なのか全く理解できません。どなたか助けていただければ幸いです。

net-snmpディレクトリ名:

ネットSNMP5.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内にマシンがあると書かれています。マシンがインターネットに接続してアップデートを取得し、ソフトウェアをインストールできるように何らかの方法で設定する必要があります。これは、適切なプロキシは、必要のないすべてのパッケージをミラーリングするオーバーヘッドなしで、ローカルミラーのように動作します。

アップデートにアクセスできない状態でマシンを実行すると、セキュリティ上のリスクが生じるとみなされます。また、ご存知のとおり、ソフトウェアのインストールが困難になります。

関連情報