Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

lib question 1

Status
Not open for further replies.

peterve

IS-IT--Management
Mar 19, 2000
1,348
NL
OS : Redhat Linux 7.1

I had to install a few libraries (libnet, glib, ...) in order to compile Firewalk, but it doens't seem to work on any of them

I started with Libnet :
I placed the tar file in /utils/libnet,
untarred it,
ran the make and make install (as specified in the readme file)
but when I compile Firewalk, it still says that it can't find libnet

In general, I think I'm doing something wrong in compiling these libraries...
Maybe I put the files in the wrong directory... and ran the make in the wrong directory
Can somebody please explain step by step how I can get this right please ? Thanks ---------------------------------------------------------------------
I have not failed, I've just found 10,000 ways that don't work
---------------------------------------------------------------------
Peter Van Eeckhoutte
peter.ve@pandora.be
*:->* Did this post help? Click below to let me know !
 
When I've compiled libraries from source in the past, I've usually found that they install into /usr/local/lib by default. This isn't in the standard library search paths, so you usually have a few choices.

1) If the compilation using the "configure" script, add "--prefix=/" to the arguments when you run "configure". This places libraries and header files into /lib when you run "make install" at the end of the compilation run.

2) Try adding "/usr/local/lib" as a new line at the end of the file "/etc/ld.so.conf", and the run "ldconfig". You will need to do the edit and the run while logged in with super-user permissions. This sets up the search path for shared libraries so that it includes "/usr/local/lib".

3) Set the environment variable "LD_LIBRARY_PATH" to include "/usr/local/lib". This isn't usually set by default on most systems I've looked at, so you may need to set it up as a new entry in your .bashrc (or similar shell start up file). The syntax is exactly the same as for the PATH variable, and it works in just the same way. This time, though, it's a search path for shared libraries.

4) Provide a symbolic link from the compiled library in /usr/local/lib to /usr/lib, or even /lib. (These days /lib and /usr/lib seem to be symbolic links to a single directory anyway.) More info on how to do this if you do a "man ln" - look for the "-s" option.

Hope this helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top