Solved

compile and install from source in linux

Posted on 2010-11-09
8
469 Views
Last Modified: 2012-05-10
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/detection-plugins'
make  install-am
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/src/detection-plugins'
make[4]: Entering directory `/opt/snort/snort-2.9.0.1/src/detection-plugins'
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/detection-plugins'
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/src/detection-plugins'
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/src/detection-plugins'
Making install in dynamic-plugins
make[2]: Entering directory `/opt/snort/snort-2.9.0.1/src/dynamic-plugins'
Making install in sf_engine
make[3]: Entering directory `/opt/snort/snort-2.9.0.1/src/dynamic-plugins/sf_eng                                                                             ine'
make  install-recursive
make[4]: Entering directory `/opt/snort/snort-2.9.0.1/src/dynamic-plugins/sf_eng                                                                             ine'
Making install in examples
make[5]: Entering directory `/opt/snort/snort-2.9.0.1/src/dynamic-plugins/sf_eng                                                                             ine/examples'
make[6]: Entering directory `/opt/snort/snort-2.9.0.1/src/dynamic-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/dynamic-plugins/sf_engi                                                                             ne/examples'
make[5]: Leaving directory `/opt/snort/snort-2.9.0.1/src/dynamic-plugins/sf_engi                                                                             ne/examples'
make[5]: Entering directory `/opt/snort/snort-2.9.0.1/src/dynamic-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_engine.o .libs/                                                                             sf_snort_plugin_api.o .libs/sf_snort_plugin_byte.o .libs/sf_snort_plugin_content                                                                             .o .libs/sf_snort_plugin_hdropts.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_static.a -L/opt/snort/snort2.9/lib -lpcre -lnsl -lm                                                                              -ldl /usr/local/lib/libdaq_static_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/libmysqlclient.so when searchi                                                                             ng for -lmysqlclient
/usr/bin/ld: skipping incompatible /usr/lib/mysql/libmysqlclient.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/dynamic-plugins/sf_engi                                                                             ne'
make[4]: *** [install-recursive] Error 1
make[4]: Leaving directory `/opt/snort/snort-2.9.0.1/src/dynamic-plugins/sf_engi                                                                             ne'
make[3]: *** [install] Error 2
make[3]: Leaving directory `/opt/snort/snort-2.9.0.1/src/dynamic-plugins/sf_engi                                                                             ne'
make[2]: *** [install-recursive] Error 1
make[2]: Leaving directory `/opt/snort/snort-2.9.0.1/src/dynamic-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

0
Comment
Question by:D_wathi
  • 4
  • 4
8 Comments
 
LVL 10

Accepted Solution

by:
TRW-Consulting earned 500 total points
ID: 34099572
Do you have MySQL installed?  It's looking for a mysql library file and can't seem to find it.

Also, most builds start with the command --  ./configure  -- before you run any 'make' command.
0
 

Author Comment

by:D_wathi
ID: 34099605
Thanks for the reply, following packages are installed:
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_64             3.51.26r1127-1.el5             installed
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.
0
 
LVL 10

Expert Comment

by:TRW-Consulting
ID: 34099634
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.
0
 

Author Comment

by:D_wathi
ID: 34099653
Thanks for the reply , SIr, shall i exectute the following:
./configure --with-mysql --with-mysql-libraries=/usr/lib64

please suggest
0
Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

 
LVL 10

Expert Comment

by:TRW-Consulting
ID: 34099660
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.
0
 

Author Comment

by:D_wathi
ID: 34099717
Sir, Thank you very much, will  try and update.
0
 

Author Comment

by:D_wathi
ID: 34099736
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.
0
 
LVL 10

Expert Comment

by:TRW-Consulting
ID: 34099767
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.
0

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Join & Write a Comment

Suggested Solutions

I have seen several blogs and forum entries elsewhere state that because NTFS volumes do not support linux ownership or permissions, they cannot be used for anonymous ftp upload through the vsftpd program.   IT can be done and here's how to get i…
Little introduction about CP: CP is a command on linux that use to copy files and folder from one location to another location. Example usage of CP as follow: cp /myfoder /pathto/destination/folder/ cp abc.tar.gz /pathto/destination/folder/ab…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now