Goutham
asked on
compile and install from source in linux
Dear Experts:
Iam having rhel5.5 interested to deploy the snort hence downloaded and installed snort i,e compiled and did make and make install but finally ended with 2 errors here iam not sure whether is this okay can ignored if not then request you to help me to give a fix for this.
for your reference posted below the complete process of make install of snort-2.9.0.1
make install
Making install in src
make[1]: Entering directory `/opt/snort/snort-2.9.0.1/ src'
Making install in sfutil
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/ src/sfutil '
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/ src/sfutil '
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/sfutil '
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/sfutil '
Making install in win32
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/ src/win32'
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/ src/win32'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/win32'
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/win32'
Making install in output-plugins
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/ src/output -plugins'
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/ src/output -plugins'
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/output -plugins'
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/output -plugins'
Making install in detection-plugins
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/ src/detect ion-plugin s'
make install-am
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/ src/detect ion-plugin s'
make[4]: Entering directory `/opt/snort/snort-2.9.0.1/ src/detect ion-plugin s'
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/detect ion-plugin s'
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/detect ion-plugin s'
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/detect ion-plugin s'
Making install in dynamic-plugins
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins'
Making install in sf_engine
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_eng ine'
make install-recursive
make[4]: Entering directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_eng ine'
Making install in examples
make[5]: Entering directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_eng ine/examples'
make[6]: Entering directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_eng ine/examples'
make[6]: Nothing to be done for `install-exec-am'.
make[6]: Nothing to be done for `install-data-am'.
make[6]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_engi ne/examples'
make[5]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_engi ne/examples'
make[5]: Entering directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_eng ine'
/bin/sh ../../../libtool --tag=CC --mode=link gcc -g -O2 -fvisibility=hidden -fno-strict-aliasing -Wall -shared -export-dynamic -module -lpcre -L/usr/local/ lib -ldnet -L/usr/lib/mysql -o libsf_engine.la -rpath /usr/local/lib/snort_dynam icengine bmh.lo sf_snort_detection_engine. lo sf_snort_plugin_api.lo sf_snort_plu gin_byte.lo sf_snort_plugin_content.lo sf_snort_plugin_hdropts.lo sf_snort_plugi n_loop.lo sf_snort_plugin_pcre.lo sf_snort_plugin_rc4.lo sfhashfcn.lo sfghash.lo sfprimetable.lo sf_ip.lo -lmysqlclient -lz -ldaq_static -lpcre -lpcap -lnsl -l m -lm -ldl -L/usr/local/lib -ldaq_static_modules -lpcap -lsfbpf
libtool: link: gcc -shared .libs/bmh.o .libs/sf_snort_detection_e ngine.o .libs/ sf_snort_plugin_api.o .libs/sf_snort_plugin_byte .o .libs/sf_snort_plugin_cont ent .o .libs/sf_snort_plugin_hdro pts.o .libs/sf_snort_plugin_loop .o .libs/sf_snort_p lugin_pcre.o .libs/sf_snort_plugin_rc4. o .libs/sfhashfcn.o .libs/sfghash.o .libs /sfprimetable.o .libs/sf_ip.o -Wl,-rpath -Wl,/usr/local/lib -Wl,-rpath -Wl,/us r/local/lib -L/usr/local/lib /usr/local/lib/libdnet -L/usr/lib/mysql -lmysqlclie nt -lz /usr/local/lib/libdaq_stat ic.a -L/opt/snort/snort2.9/lib -lpcre -lnsl -lm -ldl /usr/local/lib/libdaq_stat ic_modules .a /usr/local/lib/libsfbpf.so -lpcap -Wl,-soname -Wl,libsf_engine.so.0 -o .libs/libsf_engine.so.0.0. 0
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlcli ent.so when searchi ng for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlcli ent.a when searchin g for -lmysqlclient
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make[5]: *** [libsf_engine.la] Error 1
make[5]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_engi ne'
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_engi ne'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins/ sf_engi ne'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/ src/dynami c-plugins'
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/opt/snort/snort-2.9.0.1/ src'
make: *** [install-recursive] Error 1
-------------------------- ---------- ---------- -------
Please suggest is it required to fix the above Error 1 or is it okay can be ignored, please help
Iam having rhel5.5 interested to deploy the snort hence downloaded and installed snort i,e compiled and did make and make install but finally ended with 2 errors here iam not sure whether is this okay can ignored if not then request you to help me to give a fix for this.
for your reference posted below the complete process of make install of snort-2.9.0.1
make install
Making install in src
make[1]: Entering directory `/opt/snort/snort-2.9.0.1/
Making install in sfutil
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/
Making install in win32
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/
Making install in output-plugins
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/
make[3]: Nothing to be done for `install-exec-am'.
make[3]: Nothing to be done for `install-data-am'.
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/
Making install in detection-plugins
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/
make install-am
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/
make[4]: Entering directory `/opt/snort/snort-2.9.0.1/
make[4]: Nothing to be done for `install-exec-am'.
make[4]: Nothing to be done for `install-data-am'.
make[4]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/
Making install in dynamic-plugins
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/
Making install in sf_engine
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/
make install-recursive
make[4]: Entering directory `/opt/snort/snort-2.9.0.1/
Making install in examples
make[5]: Entering directory `/opt/snort/snort-2.9.0.1/
make[6]: Entering directory `/opt/snort/snort-2.9.0.1/
make[6]: Nothing to be done for `install-exec-am'.
make[6]: Nothing to be done for `install-data-am'.
make[6]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[5]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[5]: Entering directory `/opt/snort/snort-2.9.0.1/
/bin/sh ../../../libtool --tag=CC --mode=link gcc -g -O2 -fvisibility=hidden -fno-strict-aliasing -Wall -shared -export-dynamic -module -lpcre -L/usr/local/ lib -ldnet -L/usr/lib/mysql -o libsf_engine.la -rpath /usr/local/lib/snort_dynam
libtool: link: gcc -shared .libs/bmh.o .libs/sf_snort_detection_e
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlcli
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlcli
/usr/bin/ld: cannot find -lmysqlclient
collect2: ld returned 1 exit status
make[5]: *** [libsf_engine.la] Error 1
make[5]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[3]: *** [install] Error 2
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/
make[1]: *** [install-recursive] Error 1
make[1]: Leaving directory `/opt/snort/snort-2.9.0.1/
make: *** [install-recursive] Error 1
--------------------------
Please suggest is it required to fix the above Error 1 or is it okay can be ignored, please help
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
That may be an indicator that you did not run ./configure first. Try it before we go any further because mysql-devel should include the libmysqlclient.so file, but it is probably located in /usr/lib64/mysql instead of /usr/lib/mysql where the 'make' command is looking for it.
ASKER
Thanks for the reply , SIr, shall i exectute the following:
./configure --with-mysql --with-mysql-libraries=/us r/lib64
please suggest
./configure --with-mysql --with-mysql-libraries=/us
please suggest
Try it with no arguments to start with. It should find everything it needs. If it doesn't it will let you know and then you can start adding arguments to help resolve the problem.
ASKER
Sir, Thank you very much, will try and update.
ASKER
Sir, sorry to trouble, in the how article of snort it is mentioned to compile and install with the following:
./configure --with-mysql if only ./configure is executed will i get the mysql support, please suggest.
./configure --with-mysql if only ./configure is executed will i get the mysql support, please suggest.
If you are planning on using mysql for logging purposes then certainly, you can do that. But you don't need it to run snort. And it doesn't hurt to run ./configure multiple times with different options each time. So just try it with whatever options you want, then run 'make'. After you get it to compile to your liking finally run 'make install' to install it.
ASKER
mysql.i386 5.0.77-4.el5_5.4 installed
mysql.x86_64 5.0.77-4.el5_5.4 installed
mysql-bench.x86_64 5.0.77-4.el5_5.4 installed
mysql-connector-odbc.x86_6
mysql-devel.i386 5.0.77-4.el5_5.4 installed
mysql-devel.x86_64 5.0.77-4.el5_5.4 installed
mysql-server.x86_64 5.0.77-4.el5_5.4 installed
mysql-test.x86_64
--------------------------
but think it also requires mysqlclient10 but this is not found in reposity to install , please help me how to fix this.