ไม่สามารถติดตั้ง net-snmp ของ ubuntu 16.04: ได้รับข้อผิดพลาด
ฉันพยายามหลายครั้ง แต่ไม่สามารถติดตั้ง net-snmp บน Ubuntu 16.04i ไม่เข้าใจเลยว่าปัญหาคืออะไร โปรดช่วยอะไรมากกว่ายินดีต้อนรับ:
ชื่อไดเร็กทอรี net-snmp:
net-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
คำตอบ
/ usr / bin / ld: ไม่พบ -lperl
นี่คือตัวเชื่อมที่บ่นว่าหา perl libraries ไม่เจอ
การติดตั้งห้องสมุด Perl sudo apt install libperl-devel
วิ่ง
แต่เนื่องจากคุณไม่มีการเชื่อมต่ออินเทอร์เน็ตจึงเป็นไปไม่ได้ คุณสามารถดาวน์โหลดแพคเกจได้จากที่นี่แต่ต้องตรงกับแพ็คเกจ perl อื่น ๆ ที่ติดตั้งไว้ซึ่งในระบบออฟไลน์จำเป็นต้องมีการติดตาม
คุณเขียนว่าคุณมีเครื่องอยู่ใน DMZ คุณควรกำหนดค่าบางวิธีเพื่อให้เครื่องเข้าถึงอินเทอร์เน็ตเพื่อรับการอัปเดตและติดตั้งซอฟต์แวร์ สิ่งนี้สามารถทำได้ผ่านทางapt proxyซึ่งจะทำงานเหมือนมิเรอร์ภายในเครื่องโดยไม่มีค่าใช้จ่ายในการสะท้อนแพ็กเกจทั้งหมดที่คุณไม่ต้องการ
การใช้งานเครื่องโดยไม่สามารถเข้าถึงการอัปเดตถือเป็นความเสี่ยงด้านความปลอดภัยและอย่างที่คุณค้นพบทำให้การติดตั้งซอฟต์แวร์ยากขึ้น
ฉันได้แก้ไขปัญหานี้ด้วยวิธีปกติ:
./configure
make
sudo make install
จากนั้นฉันก็พิมพ์ snmpget --version
และฉันได้รับคำตอบว่า "เวอร์ชัน NET-SNMP: 5.7.3"
โดยหลักแล้วปัญหาได้รับการแก้ไขด้วยวิธีแก้ปัญหาโดยการสร้าง symlink ด้วยตนเองด้วย 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
ขอบคุณทุกคนสำหรับความพยายาม