LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to install a piece of software? (https://www.linuxquestions.org/questions/linux-software-2/how-to-install-a-piece-of-software-800799/)

resetreset 04-08-2010 09:54 AM

How to install a piece of software?
 
Hi,
If I rpm -U a .rpm file, and it starts spitting out "need this library" and that library etc., what do I do after that to get hold of those libraries and make the software work?
Do I have to run ldconfig after getting those packages? Exactly what does ldconfig do?


Thanks.

Tux Rules 04-08-2010 10:04 AM

Dude there are so many tutorials about this that i can only say this is a pointless thread. Just google it a little bit and i'm sure you'll make it

resetreset 04-08-2010 10:08 AM

Sorry - what do I exactly Google *for*?

Tux Rules 04-08-2010 10:09 AM

installing software in fedora

resetreset 04-08-2010 10:41 AM

the links I'm getting with that search don't cover what to do if a lib is not found - could you just tell me? Also, how to use ldconfig?

Tux Rules 04-08-2010 10:59 AM

I'm not using fedora but i had a distro based on .rpm packages once. To install a piece of software either you search for it in your repositories, with add/remove programs application, this is the easiest and more secure way. If you wanna install a package downloaded from internet things become a little bit complicated. First of all there are many kind of packages you can install in linux, you can install even windows applications. If you just wanna install a .rpm package and you lack some library files than you have to search for those lybraries too. Usually you will find them as .rpm packages either if you search for libraries specific to your distro or you will find them unpackaged and you will just have to copy them in the right folder so they will work properly.

As for ldconfig just type the command, "man ldconfig" in your terminal and you will find everything what's to know about it.

By the way there's a handy site named rpm search http://rpm.pbone.net/ , you can find almost any package you need there.

resetreset 04-08-2010 11:12 AM

I DID "man ldconfig" before you said so, but I still couldn't figure out everything - after copying the lib files to the right folder, do I need to run it?

Tux Rules 04-08-2010 11:30 AM

Quote:

Originally Posted by resetreset (Post 3928707)
I DID "man ldconfig" before you said so, but I still couldn't figure out everything - after copying the lib files to the right folder, do I need to run it?

No, if you copied it where it should be it's rightful place and if that library has the right version it should work. But tell me what are you trying to install maybe i can assist you.

ldconfig updates your shared libraries . All the libraries you need can be found as rpm packages either, just search for them and install them as other similar package.

A more obvious and interesting way in using ldconfig is when you need to link two individual libraries. Let's say you just installed a software but because it's too old it doesn't find the necessary libraries in the shared libraries, because the name of those libs changed due to the OS evolution. So with ldconfig you can link the application libraries with the newer libs from your system, that are similar with the older libraries which the application needs but your linux OS lacks because their name has changed. This way you can make a link between libraries. But than again you could just search for that library, in it's old format and name and put it in the lib folder and it should also work.

resetreset 04-08-2010 02:06 PM

Quote:

Originally Posted by Tux Rules (Post 3928724)
So with ldconfig you can link the application libraries with the newer libs from your system


How do I do this? And don't you mean application *BINARIES*?

TB0ne 04-08-2010 04:29 PM

Quote:

Originally Posted by resetreset (Post 3928633)
Hi,
If I rpm -U a .rpm file, and it starts spitting out "need this library" and that library etc., what do I do after that to get hold of those libraries and make the software work?
Do I have to run ldconfig after getting those packages? Exactly what does ldconfig do?
Thanks.

Well, the "-U" flag is for updating. That assumes you've got some version of whatever you're installing there already, and you want the new one.

When it complains about missing (or outdated), libraries/dependencies/whatever, you have two options. First, is to download them manually, from whatever source you use. http://rpm.pbone.net, your distro repository, wherever. Download the relevant RPM's, and install them first. That will satisfy the missing/outdated file problem, and let you do the install/upgrade.

Second thing (and probably better), is to use your systems package management utility to have this done for you. For me, I use openSUSE, so I fire up yast, go into software management, click on the package(s) I want to upgrade, and let it rip. It grabs all the necessary updates automatically, and installs them. Most any modern distro has the same functionality. For Fedora, it's "yum upgrade <package name>", Ubuntu "apt-get upgrade <package name>".

Ldconfig usually has to be done if you're installing libraries from source. Once you run the make command, and build/install them, you have to let the system know they're available for use. The man page on ldconfig has a good explanation on what it does and how it works. If you install libraries from an RPM file, part of the RPM processing script does this for you, so it's not something you'd have to mess with if you do it via package.

Tux Rules 04-09-2010 07:14 AM

Quote:

Originally Posted by resetreset (Post 3928892)
How do I do this? And don't you mean application *BINARIES*?

nope, i mean application specific libraries that work with the ones available from your os.

resetreset 04-11-2010 09:36 AM

Quote:

Originally Posted by TB0ne (Post 3929057)
Ldconfig usually has to be done if you're installing libraries from source. Once you run the make command, and build/install them, you have to let the system know they're available for use. The man page on ldconfig has a good explanation on what it does and how it works. If you install libraries from an RPM file, part of the RPM processing script does this for you, so it's not something you'd have to mess with if you do it via package.


Thanks a LOT, THIS is the information I was looking for :).

DavidMcCann 04-11-2010 12:17 PM

It's probably worth adding that Fedora users should use yum to install, not rpm, because yum takes care of the dependencies. If the package has been downloaded, use "yum localinstall".

On the whole, it's sometimes quicker to compile from source if the program isn't in the repositories. Since the rpm format is used by so many distros, the naming of dependencies varies. For example, a Python program made on Mandriva will list python-base as a dependency, which will baffle Fedora and Suse installations.

resetreset 04-13-2010 10:48 AM

Just to add a quick question to David: David, if I use CentOS, can I use yum on it just like you said?

DavidMcCann 04-13-2010 11:11 AM

Quote:

Originally Posted by resetreset (Post 3934178)
David, if I use CentOS, can I use yum on it just like you said?

Certainly. All the housekeeping tools, like yum or the anaconda installer, are the same in the two distros. Fedora has the very latest software versions; Red Hat incorporates them once they're sure all the bugs are at least documented, if not removed; and CentOS compiles the Red Hat source.


All times are GMT -5. The time now is 10:51 PM.