Tell me more ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I work with OSSEC HIDS In Ubuntu 11.10 from the instructions on the OSSEC wiki.

When I install with mysql support, I get this error

/tmp/ccuS4FYw.o: In function mysql_osdb_connect': /home/bkhezry/Downloads/ossec-hids-2.6/src/os_dbd/db_op.c:164: undefined reference tomysql_init'
/home/bkhezry/Downloads/ossec-hids-2.6/src/os_dbd/db_op.c:178: undefined reference to 'mysql_options'
/home/bkhezry/Downloads/ossec-hids-2.6/src/os_dbd/db_op.c:183: undefined reference to 'mysql_options'
/home/bkhezry/Downloads/ossec-hids-2.6/src/os_dbd/db_op.c:186: undefined reference to 'mysql_real_connect'
/home/bkhezry/Downloads/ossec-hids-2.6/src/os_dbd/db_op.c:189: undefined reference to 'mysql_error'
/home/bkhezry/Downloads/ossec-hids-2.6/src/os_dbd/db_op.c:190: undefined reference to 'mysql_close'
/tmp/ccuS4FYw.o: In function `mysql_osdb_close':
...

I'm sure that Mysql is installed, because I tested it with sample C++ code and back me data record. I know the problem is in src/Config.OS that is generated with:

make setdb

CDB does not point to the lib of mysql that is needed to install OSSEC HIDS. But I don't know how to fix it.

share|improve this question
It's difficult to follow what you did. Please copy-paste all the commands that you ran, including the details of what you downloaded. – Gilles Feb 26 '12 at 23:48

1 Answer

in /usr/src/ossec-hids-2.6/src/os_dbd/Makefile amend the line (move ${CDB} to end of the line),

###${CC} ${CFLAGS} ${OS_LINK} ${DBFLAGS} ${CDB} ${LOCAL} ${OBJS} -o ${NAME}
   ${CC} ${CFLAGS} ${OS_LINK} ${DBFLAGS} ${LOCAL} ${OBJS} -o ${NAME} ${CDB}

then, cd ../.. (back to /usr/src/ossec-hids-2.6/src/) to run

sudo make setdb

and finally

cd .. to run

sudo ./install.sh (in /usr/src/ossec-hids-2.6/)

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.