LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-07-2011, 01:56 AM   #1
miggety
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Rep: Reputation: Disabled
Installing Shared Libraries


Hey all, I have a question about how to install shared libraries. I'm installing an RPM package on my system (i'm using CentOS). One of the dependencies that was missing was libcrypto.so.8. So i downloaded the source for this library and configured and compiled it. How do I go about setting this up on my system so it'll be recognized as being installed. Even after i compiled and put the resulting file in the /lib directory. When i try to install the rpm once again, it still complains that the library is missing. I even made sure my LD_LIBRARY_PATH environment variable contained /lib in the path. What am i doing wrong. Is there some special way to install these shared libraries? Thanks in advance. Mike
 
Old 06-07-2011, 02:23 AM   #2
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
The special way is to use your package manager (IIRC yum, but may depend on your version of CentOS). What are you ultimately trying to install?

Evo2.
 
Old 06-07-2011, 02:32 AM   #3
miggety
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Installing Shared Libraries

Hey Evo2, thanks for the reply, I'm trying to install git on my system. I downloaded the rpm and then ran
rpm -i git-1.7.3.2-1.fc11.i386.rpm

When I run that I get the following errors:
error: Failed dependencies:
libcrypto.so.8 is needed by git-1.7.3.2-1.fc11.i386
libcurl.so.4 is needed by git-1.7.3.2-1.fc11.i386
libexpat.so.1 is needed by git-1.7.3.2-1.fc11.i386
libssl.so.8 is needed by git-1.7.3.2-1.fc11.i386
perl(Git) is needed by git-1.7.3.2-1.fc11.i386
perl-Git = 1.7.3.2-1.fc11 is needed by git-1.7.3.2-1.fc11.i386
rsync is needed by git-1.7.3.2-1.fc11.i386

would it be possible to tell me how i can install those libraries both with and without yum? Thanks again for your help with this.

Mike
 
Old 06-07-2011, 02:39 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Post # 1 :

Quote:
... it still complains that the library is missing
'rpm' checks for installed files in the rpm date base. Not the file system.

As libcrypto.so.8 is a Fedora 11 file, AFAIK, you may not have any
luck installing or using the alien unknown "RPM package".
A genuine CentOS package will do.

..

Last edited by knudfl; 06-07-2011 at 02:40 AM.
 
Old 06-07-2011, 02:41 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Post # 3


# yum install git ( Or use the 'Package Installer' to find git.)
 
Old 06-07-2011, 03:02 AM   #6
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
git-1.7.4 is in the EPEL repo.

# yum install git : Will provide git-1.7.4.1-1.el5(.i386)

https://fedoraproject.org/wiki/EPEL
 
Old 06-07-2011, 03:57 AM   #7
evo2
LQ Guru
 
Registered: Jan 2009
Location: Japan
Distribution: Mostly Debian and Scientific Linux
Posts: 5,753

Rep: Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288Reputation: 1288
As knudfl suggests you should be able to install git and its dependencies directly using yum: I know that it has been in CentOS since at least version 4.

Cheers,

Evo2.
 
Old 06-07-2011, 09:49 AM   #8
sundialsvcs
LQ Guru
 
Registered: Feb 2004
Location: SE Tennessee, USA
Distribution: Gentoo, LFS
Posts: 7,169

Rep: Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205Reputation: 2205
Occasionally, you will find that you must manally run the command (as root): /sbin/ldconfig. (It may be slightly different on your system.)

Start by carefully reading the man page on this tool, as well as the man-pages which are referenced in that one.

Basically... Linux looks for shared-libraries in a handful of locations (which you can configure, but probably shouldn't). But this would take a long time if it had to be done every time, so the loader uses a "cache file" to tell it directly where to find anything that it's looking for. Building this cache file is what ldconfig does.

The loader never actually does a filesystem search ... it always uses the cache. If the cache is not up-to-date, the file won't be seen even if it is there. A file that has been removed, but that is still listed in the cache, will be "not found" and no further searching will be done. Most of the time, RPMs that install new libraries will invoke this command, but not always.

Of course, this command refers to LD_LIBRARY_PATH when doing its work, so this information must be set up correctly before invoking it.
 
Old 06-08-2011, 10:08 AM   #9
miggety
LQ Newbie
 
Registered: Jun 2011
Posts: 6

Original Poster
Rep: Reputation: Disabled
Installing Shared Libraries

Thanks for the feedback guys, really appreciate it. If you don't mind, I have one more question regarding the yum package installer. I will read the documentation on it, but one thing i remember not being able to do is find all the packages that are available with yum. For example if i'm looking for a certain library to install, how do i even verify that it's available through yum is there a way to view a list? Thanks again.
 
Old 06-08-2011, 11:46 AM   #10
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016, Slack14.1 Deb Jessie, + 50+ other Linux OS, for test only.
Posts: 16,276

Rep: Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154Reputation: 3154
Quote:
For example if I'm looking for a certain library ..
If you mean a certain file name, this will do :

yum provides */<file-name>


And a list with all packages :
# yum list all > yum-all-packages.txt
.. will save the text file in the current directory.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
error while loading shared libraries: libtermcap.so.2: cannot open shared object file astroboy2000ir Linux - Software 3 12-08-2010 12:16 AM
top: error while loading shared libraries: libproc.so.2.0.6: cannot open shared objec ramesh_india2020 Linux - Newbie 6 07-29-2010 02:49 PM
error while loading shared libraries: libhid.so.0: cannot open shared object file: No misungs Linux - Software 4 06-10-2009 01:05 PM
Urgent !!! rpm: error while loading shared libraries: libelf.so.1: cannot open shared tinaa Linux - Software 5 12-02-2008 04:19 PM
error while loading shared libraries... installing Midnight Commander Ook Debian 7 05-09-2008 05:57 PM


All times are GMT -5. The time now is 10:34 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration