【问题标题】:Make failed nagios-plugins-1.4.3 and 1.4.9 on SunOS 9在 SunOS 9 上制作失败的 nagios-plugins-1.4.3 和 1.4.9
【发布时间】:2014-06-11 15:03:01
【问题描述】:

这里我尝试了两个版本的插件编译:1.4.3 和 1.4.9 make 的新问题,它说的如下

使用 nagios-plugin-1.4.3

source='check_ldap.c' object='check_ldap.o' libtool=no \
DEPDIR=.deps depmode=gcc /bin/bash ../depcomp \
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../intl -I/usr/include/ldap  -I/usr/local/ssl/include   -I/usr/local/ssl/include -Wall -g -O2 -c check_ldap.c
check_ldap.c: In function `main':
check_ldap.c:105: warning: implicit declaration of function `ldap_init'
check_ldap.c:105: warning: assignment makes pointer from integer without a cast
check_ldap.c:171: warning: implicit declaration of function `ldap_bind_s'
check_ldap.c:179: warning: implicit declaration of function `ldap_search_s'
check_ldap.c:187: warning: implicit declaration of function `ldap_unbind'
/bin/bash ../libtool --mode=link --tag=CC gcc -Wall -g -O2   -L/usr/local/ssl/lib -L. -R/usr/local/ssl/lib -o check_ldap  check_ldap.o netutils.o utils.o ../lib/libnagiosplug.a ../lib/libcoreutils.a  -lnsl -lsocket -lresolv -lldap -llber ../intl/libintl.a -liconv -lgen -lsocket  -lssl -lcrypto
gcc -Wall -g -O2 -o check_ldap check_ldap.o netutils.o utils.o  -L/usr/local/ssl/lib -L/tmp/nagios-plugins-1.4.3/plugins ../lib/libnagiosplug.a ../lib/libcoreutils.a /usr/local/lib/libldap.so -L/usr/local/lib -L/usr/lib -L/usr/openwin/lib -L/usr/local/BerkeleyDB.4.2/lib -lnet /usr/local/lib/libsasl2.so -ldl -lnsl -lresolv /usr/local/lib/liblber.so ../intl/libintl.a /usr/local/lib/libiconv.so -lgen -lsocket -lssl -lcrypto -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/ssl/lib
/usr/local/sparc-sun-solaris2.6/bin/ld: cannot find -lnet
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `check_ldap'
Current working directory /tmp/nagios-plugins-1.4.3/plugins
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /tmp/nagios-plugins-1.4.3/plugins
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /tmp/nagios-plugins-1.4.3
*** Error code 1
make: Fatal error: Command failed for target `all'

使用 nagios-plugins-1.4.9

    source='check_ldap.c' object='check_ldap.o' libtool=no \
DEPDIR=.deps depmode=gcc /bin/bash ../build-aux/depcomp \
gcc -DLOCALEDIR=\"/usr/local/nagios/share/locale\" -DHAVE_CONFIG_H -I. -I. -I.. -I.. -I../lib -I../gl -I../intl -I/usr/include/ldap  -I/usr/local/ssl/include   -D_REENTRANT -I/usr/local/ssl/include  -g -O2 -c check_ldap.c
check_ldap.c: In function `main':
check_ldap.c:118: warning: assignment makes pointer from integer without a cast
/bin/bash ../libtool --tag=CC --mode=link gcc  -g -O2   -L/usr/local/ssl/lib -L. -L/usr/local/ssl/lib -o check_ldap  check_ldap.o netutils.o utils.o ../lib/libnagiosplug.a ../gl/libgnu.a  -lnsl -lsocket -lresolv -lldap -llber -lsocket
gcc -g -O2 -o check_ldap check_ldap.o netutils.o utils.o  -L/usr/local/ssl/lib -L/tmp/nagios-plugins-1.4.9/plugins ../lib/libnagiosplug.a ../gl/libgnu.a /usr/local/lib/libldap.so -L/usr/local/lib -L/usr/lib -L/usr/openwin/lib -L/usr/local/BerkeleyDB.4.2/lib -lgen -lnet /usr/local/lib/libsasl2.so -ldl -lnsl -lresolv -lssl -lcrypto /usr/local/lib/liblber.so -lsocket -Wl,--rpath -Wl,/usr/local/lib -Wl,--rpath -Wl,/usr/local/lib
/usr/local/sparc-sun-solaris2.6/bin/ld: cannot find -lnet
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `check_ldap'
Current working directory /tmp/nagios-plugins-1.4.9/plugins
*** Error code 1
make: Fatal error: Command failed for target `all-recursive'
Current working directory /tmp/nagios-plugins-1.4.9
*** Error code 1
make: Fatal error: Command failed for target `all'

我确定这个 SunOS 上缺少一些库。不太确定它是什么?

【问题讨论】:

标签: plugins makefile nagios sunos


【解决方案1】:

非常感谢您对 Etan 的评论, 我在这里关注了 Etan 的评论。在 google 中搜索了 libnet 包。在以下链接中找到:

libnet download link

将包文件复制到受影响的 Solaris 9 机器,然后用 gunzip 解压缩,运行以下命令

pckadd -d libnet-1.1.1-sol9-sparc-local

现在 lnet 的问题消失了!希望这对遇到此类问题的其他用户有所帮助。

干杯

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-04-11
    • 1970-01-01
    • 1970-01-01
    • 2015-08-05
    • 2015-11-15
    相关资源
    最近更新 更多