Find the answer to your Linux question:
Results 1 to 5 of 5
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Snort Compile Errors

    Hello everyone, have exhausted all other options to this point. Plenty of people having similar problems on the 'net, but no answers.

    I am running Mandrake 9.2 and trying to do a snort-php-mysql install. Couldn't get Mysql to run as advertised so I ended up installing it from the Mandrake CD's. Its version is 4.0.15-1. Got that running, and everything else until I got to starting Snort. It would not start, checking the syslog revealed I did not compile mysql support into snort, oops. Problem was, the RPM placed MYSQL in a different directory than what the Snort compile was asking for.

    So back I go to recompile snort with MYSQL support. I run the following command: ./configure --with-mysql

    I get an error saying can't find mysql header files. OKAY, it seems I did not install the sql-devel package which has the header files. Mind you, these ar enot listed anywhere on the Mandrake CD's. I end up finding those files on the Mysql site for 4.0.15-0 and installed them.

    Now, I got compile and it includes Mysql support: YES and compiles fine. BUT, when I do the Make command I get the following error:

    /usr/bin/ld: cannot find -lmysqlclient
    collect2: ld returned 1 exit status

    can't find MySQL client?? huh?? I used it earlier to verify my databases are working, at least I thought. exists in /usr/lib

    Perhaps me entries in are wrong?

    Please help, and let me know if you need additional info,


  2. #2
    Linux Guru
    Join Date
    Mar 2003
    What are the entries in your /etc/ file? /usr/lib needs to be in there. If it's not, add it and then run ldconf.

    Registered Linux user #346571
    "All The Dude ever wanted was his rug back" - The Dude

  3. #3
    Jeremy thank you for the quick response, after adding the path to my and running ldconfig I still get the same error during the make:

    /usr/bin/ld: cannot find -lmysqlclient
    collect2: ld returned 1 exit status
    make[3]: *** [snort] Error 1
    make[3]: Leaving directory `/root/snortinstall/snort-2.1.0/src'
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/root/snortinstall/snort-2.1.0/src'
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/root/snortinstall/snort-2.1.0'
    make: *** [all] Error 2

    This is what my file looks like:


    Well, since the libmysqlclient is in there, could there be a versioning conflict? THe MYSQL version installed is 4.0.15-1, from the Mandrake 9.2 CD's. But the the ONLY devel package I could find was 4.0.15-0, which I installed (it was an RPM).

    Thank you,

    please advise. tearing my hair out here.

  4. $spacer_open
  5. #4
    *bump*, still looking for help if anyone knows of anything!

    great, thanks

  6. #5
    Just Joined!
    Join Date
    Dec 2004
    Broomfield, CO
    Quote Originally Posted by newpylong
    *bump*, still looking for help if anyone knows of anything!

    great, thanks
    I just got done installing mysql/snort/php and encountered similar problems.

    1. mysql. After it's installed, there are environment variables that point the temp files to /root/tmp. I added a tmpdir variable to the .ini file in /etc (my.ini maybe; I'm not at home). I also added tmp environment variables to the mysql startup script to point the tmp files to /tmp.

    2. snort. You have to say ./configure --with-mysql=[mysql dir]. I made that same mistake the first time I compiled it.

    3. php. I'm still in process of finishing this up. It seems to have installed fine but no response on the server side.

    I've been using the Cox/Gerg book, Managing Security with Snort & IDS Tools which has all the correct compile options for each of the packages.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts