Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:


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

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


apt-get install libmysqlclient-dev 

it solved my problem

share|improve this answer

Your Answer


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.