LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   A brief explanation of dependencies (https://www.linuxquestions.org/questions/linux-software-2/a-brief-explanation-of-dependencies-460437/)

MALDATA 07-02-2006 09:44 PM

A brief explanation of dependencies
 
Hey everyone

I want to install Mplayer on my machine from the rpms on the website. I downloaded them, but when I try to install it says I am missing the libxvidcore.so.4 dependency. So, I downloaded the xvidcore tar file from xvid.org and installed it... but the mplayer rpms still fail out on the dependency.

The point here isn't really to get mplayer installed as fast as possible. I understand I can probably do it faster by installing from source or using yum. But, as a novice linux user, I want to understand how to fix these problems without running from them. I did search the forums and the FAQs and everything I found said to either do it from source or from yum. Can anyone explain the problem here and maybe point me in the right direction?

Thanks!

rkelsen 07-02-2006 10:49 PM

Quote:

Originally Posted by MALDATA
I want to install Mplayer on my machine from the rpms on the website. I downloaded them, but when I try to install it says I am missing the libxvidcore.so.4 dependency. So, I downloaded the xvidcore tar file from xvid.org and installed it... but the mplayer rpms still fail out on the dependency.

When installing libraries under Linux, you need to run a command called 'ldconfig'. Provided that the libraries are installed under one of the directories contained in /etc/ld.so.conf, all should be sweet after that.

ldconfig updates the library cache that is used by the run time linker.

Now, having said that, the rpm dependancy check will still fail if you haven't got the libxvid*.rpm package installed. The reason for this is that rpm can only find items in your package database. If you install from source, then you have bypassed rpm and it won't know what is going on. The best option is to find the libxvid*.rpm and install that. Alternatively, you can also use the '--nodeps' flag when installing the mplayer rpm.
Quote:

Originally Posted by MALDATA
But, as a novice linux user, I want to understand how to fix these problems without running from them.

You don't know how refreshing that is!! :D

cs-cam 07-02-2006 11:17 PM

Quote:

everything I found said to either do it from source or from yum
That is your answer, do it from Yum. Package managers are fantastic, they really truly are. Use them whenever possible and you'l run into significantly less deps issues.

MALDATA 07-03-2006 12:55 AM

rkelsen: Sounds good, I'll give that a try and drop a message in here reporting sweet sweet victory or crushing defeat.

cs-cam: I've still got some research to do on yum. I know the basics but there's a lot about the repos and whatnot I need to figure out still. Basically, if it's not in the default repos, I do it from source or rpm. I agree that they're fantastic, but I think I learn better starting the hard way...

Anyway, thanks you two, I appreciate the help!

mcmillan 07-03-2006 03:56 PM

Quote:

Now, having said that, the rpm dependancy check will still fail if you haven't got the libxvid*.rpm package installed. The reason for this is that rpm can only find items in your package database.
I didn't know that. Do other package managers work the same way, or is that something specific to rpms?

Adrian Baker 07-03-2006 04:41 PM

Quote:

Originally Posted by rkelsen
When installing libraries under Linux, you need to run a command called 'ldconfig'. Provided that the libraries are installed under one of the directories contained in /etc/ld.so.conf, all should be sweet after that.

ldconfig updates the library cache that is used by the run time linker.
:D

I'm having similar problems installing xine to play DVDs (see This unresolved thread)

Anyway, on the Xine documentation site, it tells me to install the xine-lib files first with the commands:
./configure
make install

which I did. It then says:

Make sure your /etc/ld.so.conf contains /usr/local/lib and continue with...


This is what you refer to in the quote above isn't it rkelsen? Well if i look at the file (directory?) /etc/ld.so.conf I can only find one called /etc/ld.so.conf.d and this appears to be empty. I have tried everything I can to get Xine installed, (read my thread above)and would really appreciate it if you could explain about the /etc/ld.so.conf bit.
Thanks.

Adrian Baker 07-03-2006 04:51 PM

ooops

After days wondering about this I just realised that /etc/ld.so.conf is a file whereas /etc/ld.so.conf.d is a directory.

My /etc/ld.so.conf DOES contain usr/local/lib

Not that then!! back to the drawing board.....

rkelsen 07-03-2006 06:24 PM

Quote:

Originally Posted by mcmillan
I didn't know that. Do other package managers work the same way, or is that something specific to rpms?

If you install anything from source (using ./configure && make && make install) then there is an extremely high probability that your package manager won't see it. Some package managers are designed to work with source code, but even they won't see the items installed in such a manner.
Quote:

Originally Posted by Adrian Baker
After days wondering about this I just realised that /etc/ld.so.conf is a file whereas /etc/ld.so.conf.d is a directory.

My /etc/ld.so.conf DOES contain usr/local/lib

Good. Remember that once you've installed a library, you need to run the "ldconfig" command.

Now, from your other thread:
Quote:

Originally Posted by Adrian Baker
I tried
./configure --prefix=/usr/src/packages/BUILD/xine-lib-1.1.1/bin

You shouldn't need to use the --prefix option at all. By default, most source code is pre-configured to install itself under /usr/local. If you wanted to change that to another directory (say /opt) then you would use "--prefix=/opt".

Using the --prefix option in the manner you've tried is insane, and pretty much guaranteed to not work.

If you want to put the files under "/usr/src/packages/BUILD" so that you can make an rpm package yourself, you should use these 3 commands:
Code:

# ./configure
# make
# make install DESTDIR=/usr/src/packages/BUILD/xine-lib-1.1.1

But I don't know how to make an rpm package, so you'll have to read up on that yourself. Just be aware that the files installed to /usr/src/packages/BUILD will not be visible to the system. You'd have to make the rpm package and then install it in order for everything to work.

MALDATA 07-04-2006 12:20 AM

Yep, got it down. The only problem was that I ended up with an error like "cannot restore segment prot after reloc: Permission denied." I googled it and all I had to do was turn off SELinux to fix it, but I imagine I also could've fixed it without turning it off completely.

Thanks everyone.

Adrian Baker 07-04-2006 05:28 PM

Hi rkelsen

Thanks so much for your help. After week of trying to get Xine to work I have finally got there!! I tried many different sources and finally installed it through Yast. However, the codecs failed to install and this has been a continual problem. However, I have configured Xine to use codecs that I have installed elsewhere and now it all works. I now can play DVDs through mplayer or Xine!

I finally feel that i at last have a working (basic) knowledge of Linux... yippee!


All times are GMT -5. The time now is 05:26 PM.