Thursday, September 6, 2012

Compiling nagios-plugins-1.4.16 throws an error

I was installing Nagios on a new Ubuntu Server following this guide, but using the latest versions (Nagios 3.4.1 and Nagios Plugins 1.4.15).

Running make on the Nagios Plugins threw me the following error:
....
 check_http.c:312:9: error: ‘ssl_version’ undeclared (first use in this function)
....
make[2]: *** [check_http.o] Error 1
make[2]: Leaving directory `/home/nicadmin/nagios-plugins-1.4.16/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nicadmin/nagios-plugins-1.4.16'
make: *** [all] Error 2


A workaround is installing the libssl-dev package and reconfiguring.
root@host1:~/nagios-plugins-1.4.16# apt-get install libssl-dev
root@host1:~/nagios-plugins-1.4.16# ./configure --with-nagios-user=nagios --with-nagios-group=nagios
root@host1:~/nagios-plugins-1.4.16# make
root@host1:~/nagios-plugins-1.4.16# make install


Source: http://sourceforge.net/mailarchive/forum.php?thread_name=0957CCC9-6B31-4081-ADF1-D04F00212EC4%40gmail.com&forum_name=nagiosplug-devel

22 comments:

  1. Thank you so much. That error was driving me nuts!

    ReplyDelete
  2. Works like a charm!

    ReplyDelete
  3. Thanks! in red hat the command was
    yum install openssl-devel
    this worked for updating to 1.4.16 plugins

    ReplyDelete
  4. Thanks again. As stated by Rothgar, this also works on Redhat with openssl-devel

    ReplyDelete
  5. I received the same error message within Centos 6.4 and yum install openssl-devel -y corrected the issue for me.

    ReplyDelete
    Replies
    1. This comment has been removed by the author.

      Delete
  6. i have follow errors:

    make all-recursive
    make[3]: Entering directory `/home/jack/nagios-plugins-1.4.16/gl'
    make[4]: Entering directory `/home/jack/nagios-plugins-1.4.16/gl'
    gcc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -O2 -MT base64.o -MD -MP -MF .deps/base64.Tpo -c -o base64.o base64.c
    mv -f .deps/base64.Tpo .deps/base64.Po
    gcc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -O2 -MT close-hook.o -MD -MP -MF .deps/close-hook.Tpo -c -o close-hook.o close-hook.c
    mv -f .deps/close-hook.Tpo .deps/close-hook.Po
    gcc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -O2 -MT exitfail.o -MD -MP -MF .deps/exitfail.Tpo -c -o exitfail.o exitfail.c
    mv -f .deps/exitfail.Tpo .deps/exitfail.Po
    gcc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -O2 -MT full-read.o -MD -MP -MF .deps/full-read.Tpo -c -o full-read.o full-read.c
    mv -f .deps/full-read.Tpo .deps/full-read.Po
    gcc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -O2 -MT full-write.o -MD -MP -MF .deps/full-write.Tpo -c -o full-write.o full-write.c
    mv -f .deps/full-write.Tpo .deps/full-write.Po
    gcc -DHAVE_CONFIG_H -I. -I.. -I../intl -g -O2 -MT localcharset.o -MD -MP -MF .deps/localcharset.Tpo -c -o localcharset.o localcharset.c
    In file included from localcharset.c:28:0:
    ./stdio.h:456:1: error: ‘gets’ undeclared here (not in a function)
    make[4]: *** [localcharset.o] Error 1
    make[4]: Leaving directory `/home/jack/nagios-plugins-1.4.16/gl'
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/home/jack/nagios-plugins-1.4.16/gl'
    make[2]: *** [all] Error 2
    make[2]: Leaving directory `/home/jack/nagios-plugins-1.4.16/gl'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/home/jack/nagios-plugins-1.4.16'
    make: *** [all] Error 2

    ReplyDelete
  7. Thanks! It solved my problem!

    ReplyDelete
  8. install openssl-devel (if it is RHEL/CentOS)

    ReplyDelete
  9. grazie, funziona tutto
    thank you, it all works

    ReplyDelete
  10. I have the same error with Nagios 3.5.0 and Nagios Plugins 1.4.16, your post safed my life. :-) Thanks a lot. :-)

    ReplyDelete