ABHIONLINUX
Site useful for linux administration and web hosting

2012/10/20

Compiling nagios-plugins-1.4.16 throws an error


While compiling nagios plugins, you can get an error given below.

==========================
 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 `/usr/local/src/nagios-plugins-1.4.16/plugins'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/usr/local/src/nagios-plugins-1.4.16'
make: *** [all] Error 2
========================

Fix :
yum install libssl-dev
yum install openssl*

Once this is installed , you will be able to compile the plugins without any issue.

2 comments:

  1. Humm..

    my fix:

    original code, file check_http.c
    306 case 'S': /* use SSL */
    307 #ifndef HAVE_SSL
    308 usage4 (_("Invalid option - SSL is not available"));
    309 #endif
    310 use_ssl = TRUE;
    311 if (optarg == NULL || c != 'S')
    312 ssl_version = 0;
    313 else {
    314 ssl_version = atoi(optarg);
    315 if (ssl_version < 1 || ssl_version > 3)
    316 usage4 (_("Invalid option - Valid values for SSL Version are 1 (TLSv1), 2 (SSLv2) or 3 (SSLv3)"));
    317 }
    318 if (specify_port == FALSE)
    319 server_port = HTTPS_PORT;
    320 break;
    321 case SNI_OPTION:

    fixed code, file check_http.c
    306 case 'S': /* use SSL */
    307 #ifndef HAVE_SSL
    308 usage4 (_("Invalid option - SSL is not available"));
    309* #else
    310 use_ssl = TRUE;
    311 if (optarg == NULL || c != 'S')
    312 ssl_version = 0;
    313 else {
    314 ssl_version = atoi(optarg);
    315 if (ssl_version < 1 || ssl_version > 3)
    316 usage4 (_("Invalid option - Valid values for SSL Version are 1 (TLSv1), 2 (SSLv2) or 3 (SSLv3)"));
    317 }
    318* #endif
    319 if (specify_port == FALSE)
    320 server_port = HTTPS_PORT;
    321 break;
    322 case SNI_OPTION:

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete