Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Hi I have problem installing barnyard2 in snort. I am trying to do this steps using the Snort PDF guide barnyard2 section.

sudo tar zxvf barnyard2-1.9.tar.gz
cd barnyard2-1.9
sudo ./configure --with-mysql

At first when I try to do this I encounter an error saying:

ERROR: unable to find mysql headers (mysql.h)

` So I went to install libmysql-dev following the instructions from this site here. Problem regarding mysql.h was gone but I got another error when I tried this

sudo ./configue --with-mysql command. 

This time error is

ERROR: unable to find mysqlclient library (libmysqlclient.*). 

So I went to follow instructions on this site here and tried to locate libmysqlclient where I have the following output:

/usr/lib/i386-linux-gnu/libmysqlclient.so.18
/usr/lib/i386-linux-gnu/libmysqlclient.so.18.0.0
/usr/lib/i386-linux-gnu/libmysqlclient_r.so.18
/usr/lib/i386-linux-gnu/libmysqlclient_r.so.18.0.0
/usr/share/doc/libmysqlclient18
/usr/share/doc/libmysqlclient18/changelog.Debian.gz
/usr/share/doc/libmysqlclient18/copyright
/var/lib/dpkg/info/libmysqlclient18:i386.list
/var/lib/dpkg/info/libmysqlclient18:i386.md5sums
/var/lib/dpkg/info/libmysqlclient18:i386.postinst
/var/lib/dpkg/info/libmysqlclient18:i386.postrm
/var/lib/dpkg/info/libmysqlclient18:i386.shlibs

I tried the command sudo ./configure –with-mysql-libraries=/usr/lib/i386-linux-gnu/ and sudo ./configure –with-mysql-libraries=/usr/share/doc/

After each command I was asked again for the first error message I encountered

ERROR: unable to find mysql headers (mysql.h)

It seems like whenever I tried to set the path to where mysql.h or libmysqlclient is located the error just pops up. How do I solve this one? Just to let you know am just an average user of ubuntu and i don't know alot of commands. I really appreciate if anyone could help out. Thanks

share|improve this question
add comment

1 Answer

Not sure if you need this answer anymore, but here's how I got it to work:

./configure --with-mysql --with-mysql-libraries=/usr/lib/x86_64-linux-gnu/ --with-mysql-includes=/usr/include/

In your case just use: i386-linux-gnu instead of the x86_64 folder path.

share|improve this answer
add comment

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.