Hi, I am newbie to NagiosXI
I follow the guide for CentOS7 installation of NRPE and after below steps done, I cannot compile the package
# cd /tmp/nrpe-nrpe-4.1.0/
# ./configure --enable-command-args
Error below:
># make all
cd ./src/; make
make[1]: Entering directory `/tmp/nrpe-nrpe-4.1.0/src'
gcc -g -O2 -I/usr/include/krb5 -DHAVE_CONFIG_H -I ../include -I ./../include -o nrpe ./nrpe.c ./utils.c ./acl.c -lssl -lcrypto -lnsl
/tmp/ccYWzbb5.o: In function `init_ssl':
/tmp/nrpe-nrpe-4.1.0/src/./nrpe.c:292: undefined reference to `OPENSSL_init_ssl'
/tmp/nrpe-nrpe-4.1.0/src/./nrpe.c:293: undefined reference to `OPENSSL_init_ssl'
/tmp/nrpe-nrpe-4.1.0/src/./nrpe.c:298: undefined reference to `TLS_server_method'
/tmp/nrpe-nrpe-4.1.0/src/./nrpe.c:321: undefined reference to `TLS_method'
/tmp/nrpe-nrpe-4.1.0/src/./nrpe.c:428: undefined reference to `SSL_CTX_set_options'
/tmp/ccYWzbb5.o: In function `get_dh2048':
/tmp/nrpe-nrpe-4.1.0/src/./../include/dh.h:42: undefined reference to `DH_set0_pqg'
collect2: error: ld returned 1 exit status
make[1]: *** [nrpe] Error 1
make[1]: Leaving directory `/tmp/nrpe-nrpe-4.1.0/src'
make: *** [all] Error 2
>#
Please help. Thank you
Compile Failed
Re: Compile Failed
Thanks for reaching out.@swddels
If the OpenSSL version is too old or not installed, you can update or install it:
sudo yum install openssl openssl-devel
After ensuring that OpenSSL and its development headers/libraries are installed, navigate back to your NRPE directory:
cd /tmp/nrpe-nrpe-4.1.0/
./configure --enable-command-args
make all
If you are still facing the issue, it might be because the compiler cannot find the OpenSSL libraries. You can check the library paths using:
echo $LD_LIBRARY_PATH
If OpenSSL's library path isn't included, you can add it:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/openssl/lib
Replace /path/to/openssl/lib with the appropriate path where the OpenSSL libraries are located.
Compile with Explicit Library Paths:
./configure --enable-command-args --with-ssl-lib=/path/to/openssl/lib
If the OpenSSL version is too old or not installed, you can update or install it:
sudo yum install openssl openssl-devel
After ensuring that OpenSSL and its development headers/libraries are installed, navigate back to your NRPE directory:
cd /tmp/nrpe-nrpe-4.1.0/
./configure --enable-command-args
make all
If you are still facing the issue, it might be because the compiler cannot find the OpenSSL libraries. You can check the library paths using:
echo $LD_LIBRARY_PATH
If OpenSSL's library path isn't included, you can add it:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/path/to/openssl/lib
Replace /path/to/openssl/lib with the appropriate path where the OpenSSL libraries are located.
Compile with Explicit Library Paths:
./configure --enable-command-args --with-ssl-lib=/path/to/openssl/lib