Ubuntu: Problem installing snort barnyard2


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


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.



apt-get install libmysqlclient-dev   

it solved my problem


I ran into this using CentOS 7 with Percona MySql.

I solved my issue by running:

yum install Percona-Server-devel

Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Next Post »