solaris 安装net-snmp make不过去 急
安装的包是net-snmp-5.4.2.1.tar.gz, beecrypt-4.1.2.tar.gz已经安装
make最后的错误码如下
ld: warning: file /ARMS/soft/net-snmp-5.4.2.1/agent/helpers/.libs/libnetsnmphelpers.so: linked to helpers/.libs/libnetsnmphelpers.so: attempted multiple inclusion of file
ld: warning: file /ARMS/soft/net-snmp-5.4.2.1/agent/.libs/libnetsnmpagent.so: linked to ./.libs/libnetsnmpagent.so: attempted multiple inclusion of file
ld: warning: file ../snmplib/.libs/libnetsnmp.so: linked to /ARMS/soft/net-snmp-5.4.2.1/snmplib/.libs/libnetsnmp.so: attempted multiple inclusion of file
Undefined first referenced
symbol in file
__ctype_b_loc ./.libs/libnetsnmpagent.so
netsnmp_arch_interface_container_load ./.libs/libnetsnmpmibs.so
netsnmp_arch_interface_index_find ./.libs/libnetsnmpmibs.so
__strdup ./.libs/libnetsnmpagent.so
__strtoul_internal ./.libs/libnetsnmpmibs.so
__strtok_r ./.libs/libnetsnmpagent.so
__errno_location ./.libs/libnetsnmpagent.so
__strtol_internal ./.libs/libnetsnmpagent.so
netsnmp_arch_set_admin_status ./.libs/libnetsnmpmibs.so
netsnmp_arch_interface_init ./.libs/libnetsnmpmibs.so
ld: fatal: Symbol referencing errors. No output written to .libs/snmpd
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `snmpd'
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我的安装笔记,在solaris9平台
bash-2.05# cd /etc/rc3.d
bash-2.05# ./S76snmpdx stop
bash-2.05# ./S77dmi stop
bash-2.05# mv S76snmpdx s76snmpdx
bash-2.05# mv S77dmi s77dmi
bash-2.05# pkgadd -d gcc-3.3.2-sol9-sparc-local
bash-2.05# pkgadd -d libgcc-3.3-sol9-sparc-local
bash-2.05# pkgadd -d openssl-0.9.8f-sol9-sparc-local
bash-2.05# pkgadd -d libiconv-1.9.2-sol9-sparc-local
bash-2.05# gzip -d net-snmp-5.3.1.tar.gz
bash-2.05# tar -xvf net-snmp-5.3.1.tar;cd net-snmp-5.3.1
bash-2.05# PATH=/usr/local/bin:/usr/sbin:/usr/bin:/usr/ccs/bin;export PATH
bash-2.05# ./configure --with-mib-modules="host disman/event-mib ucd-snmp/diskio smux agentx mibII/mta_sendmail agentx/subagent" --enable-mfd-rewrites --with-cc=gcc
bash-2.05# make
bash-2.05# make install
bash-2.05# make clean
bash-2.05# /usr/local/bin/snmpconf -i -g basic_setup
************************************************
*** Beginning basic system information setup ***
************************************************
Do you want to configure the information returned in the system MIB group (contact info, etc)? (default = y): y
Configuring: syslocation
Description:
The [typically physical] location of the system.
Note that setting this value here means that when trying to
perform an snmp SET operation to the sysLocation.0 variable will make
the agent return the "notWritable" error code. IE, including
this token in the snmpd.conf file will disable write access to
the variable.
arguments: location_string
The location of the system: v210
Finished Output: syslocation v210
Configuring: syscontact
Description:
The contact information for the administrator
Note that setting this value here means that when trying to
perform an snmp SET operation to the sysContact.0 variable will make
the agent return the "notWritable" error code. IE, including
this token in the snmpd.conf file will disable write access to
the variable.
arguments: contact_string
The contact information: lio@china.org.cn
Finished Output: syscontact lio@china.org.cn
Do you want to properly set the value of the sysServices.0 OID (if you don't know, just say no)? (default = y): y
Configuring: sysservices
Description:
The proper value for the sysServices object.
arguments: sysservices_number
does this host offer physical services (eg, like a repeater) [answer 0 or 1]: 0
does this host offer datalink/subnetwork services (eg, like a bridge): 0
does this host offer internet services (eg, supports IP): 1
does this host offer end-to-end services (eg, supports TCP): 1
does this host offer application services (eg, supports SMTP): 1
Finished Output: sysservices 76
**************************************
*** BEGINNING ACCESS CONTROL SETUP ***
**************************************
Do you want to configure the agent's access control? (default = y): y
Do you want to allow SNMPv3 read-write user based access (default = y): n
Do you want to allow SNMPv3 read-only user based access (default = y): n
Do you want to allow SNMPv1/v2c read-write community access (default = y): n
Do you want to allow SNMPv1/v2c read-only community access (default = y): y
Configuring: rocommunity
Description:
a SNMPv1/SNMPv2c read-only access community name
arguments: community [default|hostname|network/bits] [oid]
The community name to add read-only access for: v210
The hostname or network address to accept this community name from [RETURN for all]:
The OID that this community should be restricted to [RETURN for no-restriction]:
Finished Output: rocommunity v210
Do another rocommunity line? (default = y): n
****************************************
*** Beginning trap destination setup ***
****************************************
Do you want to configure where and if the agent will send traps? (default = y): n
****************************************
*** Beginning monitoring setup ***
****************************************
Do you want to configure the agent's ability to monitor various aspects of your system? (default = y): y
Do you want to configure the agents ability to monitor processes? (default = y): n
Do you want to configure the agents ability to monitor disk space? (default = y): y
Configuring: disk
Description:
Check for disk space usage of a partition.
The agent can check the amount of available disk space, and make
sure it is above a set limit.
disk PATH [MIN=100000]
PATH: mount path to the disk in question.
MIN: Disks with space below this value will have the Mib's errorFlag set.
Can be a raw byte value or a percentage followed by the %
symbol. Default value = 100000.
The results are reported in the dskTable section of the UCD-SNMP-MIB tree
Enter the mount point for the disk partion to be checked on: /
Enter the minimum amount of space that should be available on /: 5%
Finished Output: disk / 5%
Do another disk line? (default = y): y
Configuring: disk
Description:
Check for disk space usage of a partition.
The agent can check the amount of available disk space, and make
sure it is above a set limit.
disk PATH [MIN=100000]
PATH: mount path to the disk in question.
MIN: Disks with space below this value will have the Mib's errorFlag set.
Can be a raw byte value or a percentage followed by the %
symbol. Default value = 100000.
The results are reported in the dskTable section of the UCD-SNMP-MIB tree
Enter the mount point for the disk partion to be checked on: /usr
Enter the minimum amount of space that should be available on /usr: 5%
Finished Output: disk /usr 5%
Do another disk line? (default = y): y
Configuring: disk
Description:
Check for disk space usage of a partition.
The agent can check the amount of available disk space, and make
sure it is above a set limit.
disk PATH [MIN=100000]
PATH: mount path to the disk in question.
MIN: Disks with space below this value will have the Mib's errorFlag set.
Can be a raw byte value or a percentage followed by the %
symbol. Default value = 100000.
The results are reported in the dskTable section of the UCD-SNMP-MIB tree
Enter the mount point for the disk partion to be checked on: /var
Enter the minimum amount of space that should be available on /var: 5%
Finished Output: disk /var 5%
Do another disk line? (default = y): y
Configuring: disk
Description:
Check for disk space usage of a partition.
The agent can check the amount of available disk space, and make
sure it is above a set limit.
disk PATH [MIN=100000]
PATH: mount path to the disk in question.
MIN: Disks with space below this value will have the Mib's errorFlag set.
Can be a raw byte value or a percentage followed by the %
symbol. Default value = 100000.
The results are reported in the dskTable section of the UCD-SNMP-MIB tree
Enter the mount point for the disk partion to be checked on: /opt
Enter the minimum amount of space that should be available on /opt: 5%
Finished Output: disk /opt 5%
Do another disk line? (default = y): y
Configuring: disk
Description:
Check for disk space usage of a partition.
The agent can check the amount of available disk space, and make
sure it is above a set limit.
disk PATH [MIN=100000]
PATH: mount path to the disk in question.
MIN: Disks with space below this value will have the Mib's errorFlag set.
Can be a raw byte value or a percentage followed by the %
symbol. Default value = 100000.
The results are reported in the dskTable section of the UCD-SNMP-MIB tree
Enter the mount point for the disk partion to be checked on: /app
Enter the minimum amount of space that should be available on /app: 5%
Finished Output: disk /app 5%
Do another disk line? (default = y): y
Configuring: disk
Description:
Check for disk space usage of a partition.
The agent can check the amount of available disk space, and make
sure it is above a set limit.
disk PATH [MIN=100000]
PATH: mount path to the disk in question.
MIN: Disks with space below this value will have the Mib's errorFlag set.
Can be a raw byte value or a percentage followed by the %
symbol. Default value = 100000.
The results are reported in the dskTable section of the UCD-SNMP-MIB tree
Enter the mount point for the disk partion to be checked on: /export/home
Enter the minimum amount of space that should be available on /export/home: 5%
Finished Output: disk /export/home 5%
Do another disk line? (default = y): n
Do you want to configure the agents ability to monitor load average? (default = y): y
Configuring: load
Description:
Check for unreasonable load average values.
Watch the load average levels on the machine.
load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
1MAX: If the 1 minute load average is above this limit at query
time, the errorFlag will be set.
5MAX: Similar, but for 5 min average.
15MAX: Similar, but for 15 min average.
The results are reported in the laTable section of the UCD-SNMP-MIB tree
Enter the maximum allowable value for the 1 minute load average: 5
Enter the maximum allowable value for the 5 minute load average: 5
Enter the maximum allowable value for the 15 minute load average: 5
Finished Output: load 5 5 5
Do another load line? (default = y): y
Configuring: load
Description:
Check for unreasonable load average values.
Watch the load average levels on the machine.
load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
1MAX: If the 1 minute load average is above this limit at query
time, the errorFlag will be set.
5MAX: Similar, but for 5 min average.
15MAX: Similar, but for 15 min average.
The results are reported in the laTable section of the UCD-SNMP-MIB tree
Enter the maximum allowable value for the 1 minute load average: 5
Enter the maximum allowable value for the 5 minute load average: 5
Enter the maximum allowable value for the 15 minute load average: 5
Finished Output: load 5 5 5
Do another load line? (default = y): n
Do you want to configure the agents ability to monitor file sizes? (default = y): y
Configuring: file
Description:
Check on the size of a file.
Display a files size statistics.
If it grows to be too large, report an error about it.
file /path/to/file [maxsize_in_bytes]
if maxsize is not specified, assume only size reporting is needed.
The results are reported in the fileTable section of the UCD-SNMP-MIB tree
Enter the path to the file you wish to monitor:
Enter the maximum size (in bytes) allowable for :
Finished Output: file
Do another file line? (default = y): n
The following files were created:
snmpd.conf installed in /usr/local/share/snmp
bash-2.05# vi /usr/local/share/snmp/snmpd.conf
###########################################################################
#
# snmpd.conf
#
# - created by the snmpconf configuration program
#
###########################################################################
# SECTION: System Information Setup
#
# This section defines some of the information reported in
# the "system" mib group in the mibII tree.
# syslocation: The [typically physical] location of the system.
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysLocation.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: location_string
syslocation public
# syscontact: The contact information for the administrator
# Note that setting this value here means that when trying to
# perform an snmp SET operation to the sysContact.0 variable will make
# the agent return the "notWritable" error code. IE, including
# this token in the snmpd.conf file will disable write access to
# the variable.
# arguments: contact_string
syscontact lio@china.org.cn
# sysservices: The proper value for the sysServices object.
# arguments: sysservices_number
sysservices 76
###########################################################################
# SECTION: Access Control Setup
#
# This section defines who is allowed to talk to your running
# snmp agent.
# rocommunity: a SNMPv1/SNMPv2c read-only access community name
# arguments: community [default|hostname|network/bits] [oid]
rocommunity public
rocommunity community 172.32.3.0/24
rocommunity community 172.32.4.0/24
###########################################################################
# SECTION: Monitor Various Aspects of the Running Host
#
# The following check up on various aspects of a host.
# disk: Check for disk space usage of a partition.
# The agent can check the amount of available disk space, and make
# sure it is above a set limit.
#
# disk PATH [MIN=100000]
#
# PATH: mount path to the disk in question.
# MIN: Disks with space below this value will have the Mib's errorFlag set.
# Can be a raw byte value or a percentage followed by the %
# symbol. Default value = 100000.
#
# The results are reported in the dskTable section of the UCD-SNMP-MIB tree
disk / 5%
disk /usr 5%
disk /opt 5%
disk /var 5%
disk /export/home 5%
# load: Check for unreasonable load average values.
# Watch the load average levels on the machine.
#
# load [1MAX=12.0] [5MAX=12.0] [15MAX=12.0]
#
# 1MAX: If the 1 minute load average is above this limit at query
# time, the errorFlag will be set.
# 5MAX: Similar, but for 5 min average.
# 15MAX: Similar, but for 15 min average.
#
# The results are reported in the laTable section of the UCD-SNMP-MIB tree
load 12 14 15
bash-2.05# vi /etc/rc3.d/S78net-snmp
#!/sbin/sh
#
# Copyright (c) 1997 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident "@(#)init.snmpdx 1.12 97/12/08 SMI"
LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/usr/local/ssl/lib;export LD_LIBRARY_PATH
case "$1" in
'start')
if [ -f /usr/local/share/snmp/snmpd.conf ]; then
/usr/local/sbin/snmpd -c /usr/local/share/snmp/snmpd.conf
fi
echo 'netsnmp service starting.'
;;
'stop')
/usr/bin/pkill -9 -x -u 0 '(snmpd)'
echo 'netsnmp service stop.'
;;
*)
echo "Usage: $0 { start | stop }"
exit 1
;;
esac
exit 0
bash-2.05# /etc/rc3.d/S78net-snmp start