While configuring OSSEC HIDS to work with MySQL, I encountered an issue during the database setup. When running the make setdb
command, I received the following error:
Error: PostgreSQL client libraries not installed.
Understanding the Issue
OSSEC’s database setup process appears to require both MySQL and PostgreSQL client libraries to be installed, even if you’re only using MySQL. This dependency can be frustrating, especially if you don’t plan to use PostgreSQL at all.
Quick Fix: Installing PostgreSQL Libraries
The simplest way to resolve this issue is to install the PostgreSQL client libraries. This can be done using the yum
package manager:
# yum install postgresql
After the installation completes, try running the database setup command again:
# make setdb
This should resolve the issue and allow you to continue configuring OSSEC with MySQL.
Alternative Solution: Avoiding PostgreSQL Installation
If you prefer not to install PostgreSQL, there are alternative workarounds available. One such method is discussed in this OSSEC forum thread. The thread provides instructions on how to bypass the PostgreSQL requirement, which might be useful if you’re strictly using MySQL.