OSSEC and Postgres Install Error

468 views
Skip to first unread message

Jason Aleksi

unread,
Jan 26, 2016, 7:02:28 AM1/26/16
to ossec-list
OSSEC seems to be ignoring Postgres during the install.  This is running on Ubuntu 14.04 LTS.

I already have Postgres and postgres-client installed.
sudo apt-get -y install postgresql postgresql-client postgresql-contrib

I get an error when I run setdb (notice it doesn't say anything about postgres)
service@apps:/opt/ossec-hids-2.8.1/src$ sudo make setdb
Error: MySQL client libraries not installed.
Error: DB libraries not installed.

Even though I do not use/need MySQL, I installed them anyway just to test.
service@apps:/opt/ossec-hids-2.8.1/src$ sudo apt-get -y install libmysqlclient-d  mysql-client

I rerun the setdb and everything looks good, but it's missing the postgres support
service@apps:/opt/ossec-hids-2.8.1/src$ sudo make setdb
Info: Compiled with MySQL support.
service@apps:/opt/ossec-hids-2.8.1/src$ 

When I go to start OSSEC, I get an error saying OSSEC is not compiled with support for postgresql.
service@apps:/opt/ossec-hids-2.8.1$ sudo /var/ossec/bin/ossec-control start
Starting OSSEC HIDS v2.8 (by Trend Micro Inc.)...
2016/01/26 00:33:19 ossec-dbd(5207): ERROR: OSSEC not compiled with support for                                                  'postgresql'.
2016/01/26 00:33:19 ossec-dbd(1202): ERROR: Configuration error at '/var/ossec/e                                                 tc/ossec.conf'. Exiting.
ossec-dbd did not start correctly.
service@apps:/opt/ossec-hids-2.8.1$


I've looked in the docs and search the forums, but I cannot find what am I doing wrong.  Suggestions?  

dan (ddp)

unread,
Jan 26, 2016, 10:24:11 AM1/26/16
to ossec...@googlegroups.com

I'm not sure of the status of the postgresql support, I don't even know if it works.
First thing I'd do is look for dev or devel packages of the packages you've installed.

> --
>
> ---
> You received this message because you are subscribed to the Google Groups "ossec-list" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to ossec-list+...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Jason Aleksi

unread,
Jan 27, 2016, 9:21:39 AM1/27/16
to ossec-list
I had some time last night to work on this more.  I found another library that I didn't have installed.  When I installed the libpq-dev package, I was able to run the setdb and install with Postgres support.

When installing OSSEC with Postgres support, one needs to make sure this library is installed.

sudo apt-get -y install libpq-dev

-JA-

dan (ddp)

unread,
Jan 27, 2016, 10:11:59 AM1/27/16
to ossec...@googlegroups.com


On Jan 27, 2016 9:21 AM, "Jason Aleksi" <jason....@gmail.com> wrote:
>
> I had some time last night to work on this more.  I found another library that I didn't have installed.  When I installed the libpq-dev package, I was able to run the setdb and install with Postgres support.
>
> When installing OSSEC with Postgres support, one needs to make sure this library is installed.
>
> sudo apt-get -y install libpq-dev
>

Can you open an issue at https://girhub.com/ossec/ossec-docs for this?

alfred kwentua

unread,
Feb 2, 2016, 4:49:17 PM2/2/16
to ossec-list
I just tried to install OSSEC as well on a server i already have configured with Postgresql-9.4  I am having the same issue. i don't have MsQL installed on that server so when i try to run 

make setdb;       

I get this error, 

Error: MySQL client libraries not installed.

Error: DB libraries not installed.

any help would be greatly appreciated. 

dan (ddp)

unread,
Feb 2, 2016, 4:54:55 PM2/2/16
to ossec...@googlegroups.com

Which postgresql packages do you have installed?

Reply all
Reply to author
Forward
0 new messages