Failed to generate executables for Host monitor: In this article we will troubleshhot on below issue. We are getting “Failed to generate executables for Host monitor” error at Host monitor agent installation time. Here we will perform this activity on Oracle AVDF 20.10 version.
Problem:
[root@test hm]# /usr/local/hm/hostmonsetup install agentuser=oracle agentgroup=oinstall
Failed to generate executables for Host monitor.
Check /usr/local/hm/makelogerror for more info.
[root@test hm]#
[root@test hm]#
[root@test hm]# cat /usr/local/hm/makelogerror
/bin/ld: cannot find -lcap
/bin/ld: cannot find -lssl
/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
make: *** [hostmonitor] Error 1
[root@test hm]#
Cause:
This means the host server does not have the required libraries for the host monitor agent installation. Install the required libraries listed in “Prerequisites for Host Monitoring”.
Solution:
We need to install some required Packages libcap, libcap-devel, openssl, and openssl-devel then retry the host monitor installation process. In my case required 2 Packages were not installed on the host server so, we install the missing 2 Packages and then issue has been resolved.
yum install libcap
yum install libcap-devel
yum install openssl
yum install openssl-devel
[root@test ~]#
[root@test ~]# cd /usr/local/hm/
[root@test hm]#
[root@test hm]#
[root@test hm]# /usr/local/hm/hostmonsetup install agentuser=oracle agentgroup=oinstall
Failed to generate executables for Host monitor.
Check /usr/local/hm/makelogerror for more info.
[root@test hm]#
[root@test hm]#
[root@test hm]# cat /usr/local/hm/makelogerror
/bin/ld: cannot find -lcap
/bin/ld: cannot find -lssl
/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
make: *** [hostmonitor] Error 1
[root@test hm]#
[root@test hm]#
[root@test hm]# yum install libcap
Loaded plugins: langpacks, ulninfo
Package libcap-2.22-11.el7.x86_64 already installed and latest version
Nothing to do
[root@test hm]#
[root@test hm]#
[root@test hm]# yum install libcap-devel
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package libcap-devel.x86_64 0:2.22-11.el7 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================
Installing:
libcap-devel x86_64 2.22-11.el7 ol7_latest 26 k
Transaction Summary
======================================================================================================================================
Install 1 Package
Total download size: 26 k
Installed size: 15 k
Is this ok [y/d/N]: y
Downloading packages:
libcap-devel-2.22-11.el7.x86_64.rpm | 26 kB 00:00:23
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : libcap-devel-2.22-11.el7.x86_64 1/1
Verifying : libcap-devel-2.22-11.el7.x86_64 1/1
Installed:
libcap-devel.x86_64 0:2.22-11.el7
Complete!
[root@test hm]#
[root@test hm]#
[root@test hm]#
[root@test hm]# /usr/local/hm/hostmonsetup install agentuser=oracle agentgroup=oinstall
Failed to generate executables for Host monitor.
Check /usr/local/hm/makelogerror for more info.
[root@test hm]#
[root@test hm]#
[root@test hm]#
[root@test hm]# cat /usr/local/hm/makelogerror
/bin/ld: cannot find -lssl
/bin/ld: cannot find -lcrypto
collect2: error: ld returned 1 exit status
make: *** [hostmonitor] Error 1
[root@test hm]#
[root@test hm]#
[root@test hm]# yum install openssl
Loaded plugins: langpacks, ulninfo
Package 1:openssl-1.0.2k-26.el7_9.x86_64 already installed and latest version
Nothing to do
[root@test hm]#
[root@test hm]#
[root@test hm]# yum install openssl-devel
Loaded plugins: langpacks, ulninfo
Resolving Dependencies
--> Running transaction check
---> Package openssl-devel.x86_64 1:1.0.2k-26.el7_9 will be installed
--> Finished Dependency Resolution
Dependencies Resolved
======================================================================================================================================
Package Arch Version Repository Size
======================================================================================================================================
Installing:
openssl-devel x86_64 1:1.0.2k-26.el7_9 ol7_latest 1.5 M
Transaction Summary
======================================================================================================================================
Install 1 Package
Total download size: 1.5 M
Installed size: 3.1 M
Is this ok [y/d/N]: y
Downloading packages:
openssl-devel-1.0.2k-26.el7_9.x86_64.rpm | 1.5 MB 00:00:25
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : 1:openssl-devel-1.0.2k-26.el7_9.x86_64 1/1
Verifying : 1:openssl-devel-1.0.2k-26.el7_9.x86_64 1/1
Installed:
openssl-devel.x86_64 1:1.0.2k-26.el7_9
Complete!
[root@test hm]#
[root@test hm]#
[root@test hm]#
[root@test hm]# /usr/local/hm/hostmonsetup install agentuser=oracle agentgroup=oinstall
Agent installed at /u01/app/oracle/avdf_agent
Detected AV Server DB's IP - 192.168.XX.XX
hostmonitor installed at "/usr/local/hm" directory.
The user:group who owns the agent - oracle:oinstall
Note: To enable authentication,
To get a Signed Certificate from the Audit Vault Server
1. Transfer /usr/local/hm/hmcsr.csr file to
/usr/local/dbfw/etc directory of AVS Server(using root credential of AVS Server)
2. At AVS Server, login as root and generate a signed cert by executing
/usr/local/dbfw/bin/generate_casigned_hmcert.sh
3. Transfer generated hmcert.crt from AV Server to /usr/local/hm on this machine.
4. As root,on this machine run -
a) chown root:root /usr/local/hm/hmcert.crt
b) chmod 400 /usr/local/hm/hmcert.crt
To require a Signed Certificate for Host Monitor Connections to the Firewall
1. At DBFW, login as root and run the following command:
cp /usr/local/dbfw/etc/controller.crt /usr/local/dbfw/etc/fw_ca.crt
chown arbiter:arbiter /usr/local/dbfw/etc/fw_ca.crt
chmod 400 /usr/local/dbfw/etc/fw_ca.crt
systemctl restart monitor
2. Restart/start hostmonitor
Successfully completed hostmonitor setup.
Host Monitor is now installed.
[root@test hm]#
Now we have resolved the issue and installed Host Monitor agent successfully.
Click on below link for another AVDF related details…
- How to install Oracle Audit Vault Server
- How to install Oracle Database Firewall Server
- How to Register Database Firewall with Audit Vault Server
- How to install Audit Vault Agent on Linux
- How to install Host Monitor Agent on Linux
- How to Register a target database on AVDF console
I hope my written content will helped you. Your suggestions/feedback are most welcome from orakldba.com. Keep learning… Have a great day!!!
Please comment here for your any query related to above content. You can write to mail me through my Email.
Email :- orakldba@gmail.com
LinkedIn :- https://linkedin.com/in/prasantakirtaniya
Twitter :- https://twitter.com/prasantadba
Facebook Page :- https://www.facebook.com/orakldba
Website :- https://orakldba.com
ACE Profile :- https://ace.oracle.com/apex/ace/profile/prasantakirtaniya
Oracle Community :- https://community.oracle.com/customerconnect/profile/discussions/prasantakirtaniya
Hi Prasanta,
very helpful post for host monitor installation.
please guide how to install host monitor on AIX server .
Hi Akhilesh,
Thanks for your valuable comment. I will share soon the requested post.
Regards,
Prasanta