LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 02-21-2011, 09:43 AM   #1
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Rep: Reputation: 49
Some 'how to & why' questions about 'Dependency Checking'...


Hello:

Moderator: If this is a really dumb post, please delete it so that I don't embarrass myself.

I am not trying to start a discussion on whether or not Slackware should check dependencies!

I am trying to understand on what it means to ‘check dependencies’ in Slackware.

Here is my understanding of package installation at present:

1) Installing packages ‘changes’ you Slackware installation.
2) ‘Changes’ might hurt your installation which is why you must check dependencies.
3) Some packages that you want to install are dependant on other packages and those packages may or may not be dependant on even other packages.
4) Slackware does not install the underlying packages automatically, you must make the ‘install – don’t install’ decision yourself.

Here are my questions and, if possible, I am looking for 'newbie' level responses to them:

1) When I review the underlying packages, what am I looking for?
2) How would I know if I should install them or not?
3) Is there a ‘method’ or ‘S.O.P.’ for checking dependencies?
4) Are there any really big ‘red flags’ to watch out for?

Thanks for your patience,
 
Click here to see the post LQ members have rated as the most helpful post in this thread.
Old 02-21-2011, 10:08 AM   #2
slack-fu
Member
 
Registered: Feb 2006
Location: Norway
Distribution: Slackware Linux 13.37
Posts: 71

Rep: Reputation: 10
It is all about stability and control.


̈́'ldd /usr/bin/packagename' will show you a list of all dependencies for that package, and whether its installed on your system or not.

'ldd /usr/bin/packagename | grep found' will show you which dependencies that are "not found" on your system.

Last edited by slack-fu; 02-21-2011 at 10:12 AM.
 
2 members found this post helpful.
Old 02-21-2011, 11:09 AM   #3
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
If you get your packages from slackbuilds, the README file will generally tell you what dependencies you need.

An easy way to see if a dependency is installed on your computer is to run pkgtool (view package option). The packages are listed in alphabetical order so it is just a matter of scrolling down the list to where the dependency would be listed if installed. (You can usually get the necessary dependencies from slackbuilds as well).
 
2 members found this post helpful.
Old 02-21-2011, 11:22 AM   #4
Lufbery
Senior Member
 
Registered: Aug 2006
Location: Harrisburg, PA
Distribution: Slackware 64 14.2
Posts: 1,180
Blog Entries: 29

Rep: Reputation: 135Reputation: 135
Quote:
Originally Posted by psionl0 View Post
An easy way to see if a dependency is installed on your computer is to run pkgtool (view package option).
An even easier way is to look in /var/log/packages

Let's say you want to install Google-Chrome and see that it requires GConf.

Just type:
Code:
ls -l /var/log/packages/GConf*
If you get "No such file or directory," then you need to install it. If you get something like this:

Code:
-rw-r--r-- 1 root root 12K 2010-08-03 01:10 /var/log/packages/GConf-2.28.1-x86_64-1_SBo
It's already installed.

If you read the file, /var/log/packages/GConf-2.28.1-x86_64-1_SBo, you get a list of all the files that are part of that package and where they're located. Here's an excerpt:

Code:
PACKAGE NAME:     GConf-2.28.1-x86_64-1_SBo
COMPRESSED PACKAGE SIZE:     1928K
UNCOMPRESSED PACKAGE SIZE:     7270K
PACKAGE LOCATION: /tmp/sbopkg/sbopkg-sbooutputdir/GConf-2.28.1-x86_64-1_SBo.tgz
PACKAGE DESCRIPTION:
GConf: GConf (GNOME configuration library)
GConf: 
GConf: GConf is a system for storing application preferences. 
GConf: It is intended for user preferences. GNOME desktop relies
GConf: on this package.
GConf:
GConf:
GConf:
GConf:
GConf:
GConf:
FILE LIST:
./
etc/
etc/dbus-1/
etc/dbus-1/system.d/
etc/dbus-1/system.d/org.gnome.GConf.Defaults.conf
etc/gconf/
etc/gconf/2/
etc/gconf/2/evoldap.conf
etc/gconf/2/path.new
etc/gconf/gconf.xml.defaults/
etc/gconf/gconf.xml.mandatory/
install/
...
There's a lot of information there.

Regards,
 
3 members found this post helpful.
Old 02-21-2011, 11:39 AM   #5
psionl0
Member
 
Registered: Jan 2011
Distribution: slackware_64 14.1
Posts: 722
Blog Entries: 2

Rep: Reputation: 124Reputation: 124
Quote:
Originally Posted by Lufbery View Post
An even easier way is to look in /var/log/packages
I was aware of that too but thought it might be easier for a noob to remember "pkgtool" than the location of a file. (The more experience you get, the easier it gets to use the CLI instead of pre-installed tools).
 
Old 02-21-2011, 12:10 PM   #6
slack-fu
Member
 
Registered: Feb 2006
Location: Norway
Distribution: Slackware Linux 13.37
Posts: 71

Rep: Reputation: 10
This thread gives a very good explanation
 
1 members found this post helpful.
Old 02-21-2011, 12:16 PM   #7
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Original Poster
Rep: Reputation: 49
Thanks to all.

If you have the time, I would like to know how you can tell that you should not install a dependency.

Also, if the dependencies are already installed, there is no problem, right?

Thanks,

Last edited by Robert.Thompson; 02-21-2011 at 12:20 PM. Reason: add
 
Old 02-21-2011, 12:26 PM   #8
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by slack-fu View Post
It is all about stability and control.


̈́'ldd /usr/bin/packagename' will show you a list of all dependencies for that package, and whether its installed on your system or not.

'ldd /usr/bin/packagename | grep found' will show you which dependencies that are "not found" on your system.
Does "ldd /sbin/mkinitrd" show "/bin/sh"?
 
Old 02-21-2011, 12:32 PM   #9
slack-fu
Member
 
Registered: Feb 2006
Location: Norway
Distribution: Slackware Linux 13.37
Posts: 71

Rep: Reputation: 10
Quote:
Originally Posted by Robert.Thompson View Post
Thanks to all.

If you have the time, I would like to know how you can tell that you should not install a dependency.
If the dependency is a system library, you must install it for the program to work.
If the dependency is a something that gives extra functionality, then its up to you to decide if you need that extra functionality

Quote:
Also, if the dependencies are already installed, there is no problem, right?
Normally thats not a problem, allthough sometimes the dependency you have can be a different version than the
version that the program requires, which might be a problem.
 
Old 02-21-2011, 12:39 PM   #10
slack-fu
Member
 
Registered: Feb 2006
Location: Norway
Distribution: Slackware Linux 13.37
Posts: 71

Rep: Reputation: 10
Quote:
Originally Posted by guanx View Post
Does "ldd /sbin/mkinitrd" show "/bin/sh"?
You know what i tried to convey.. sorry if i was unclear
 
Old 02-21-2011, 12:51 PM   #11
Robert.Thompson
Member
 
Registered: Nov 2009
Location: Montreal, Quebec, Canada
Distribution: LinuxMint 20 Cinnamon
Posts: 589

Original Poster
Rep: Reputation: 49
Quote:
Originally Posted by slack-fu View Post
... allthough sometimes the dependency you have can be a different version than the version that the program requires, which might be a problem.
And this problem would be that, if I updated to the 'version required', I could screw up something that is already depending the 'other version'?

Thanks,
 
Old 02-21-2011, 12:55 PM   #12
Darth Vader
Senior Member
 
Registered: May 2008
Location: Romania
Distribution: DARKSTAR Linux 2008.1
Posts: 2,727

Rep: Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247Reputation: 1247
I remember that, long time ago, being an young Linux Padawan, I tried to upgrade BASH. Something from version 1.02 to 1.1. Then I uninstalled the old package, wanting to install the new tarball. The results, as is predictibile, was amazing!
 
Old 02-21-2011, 01:03 PM   #13
dijetlo
Senior Member
 
Registered: Jan 2009
Location: RHELtopia....
Distribution: Solaris 11.2/Slackware/RHEL/
Posts: 1,491
Blog Entries: 2

Rep: Reputation: Disabled
Quote:
Originally Posted by Robert.Thompson View Post
And this problem would be that, if I updated to the 'version required', I could screw up something that is already depending the 'other version'?
The force is strong in this one...
Yes Bob, in fascinating and spectacular ways.
Remember the parable of Lazarus and the rich man. Once your in hell, it's too late for prayer so back up early, back up often and familiarize yourself with how to recover from the console (because the desktop may be a bridge too far, if you get my drift).
 
Old 02-21-2011, 01:08 PM   #14
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,176

Rep: Reputation: 233Reputation: 233Reputation: 233
Quote:
Originally Posted by slack-fu View Post
You know what i tried to convey.. sorry if i was unclear
I meant that it's complex to figure out dependencies when the software are black boxes. Things become much easier for white boxes.
 
Old 02-21-2011, 01:22 PM   #15
slack-fu
Member
 
Registered: Feb 2006
Location: Norway
Distribution: Slackware Linux 13.37
Posts: 71

Rep: Reputation: 10
Quote:
Originally Posted by guanx View Post
I meant that it's complex to figure out dependencies when the software are black boxes. Things become much easier for white boxes.
Thanks for making me google the terms black / white boxes. I learn something new everyday.
I just thought that ldd works on binarys but not on scripts.
 
  


Reply



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
Dependency checking this, dependency checking that. Jeebizz General 11 09-29-2009 06:51 PM
package management and dependency checking BCarey Slackware 10 01-04-2009 07:00 AM
Dependency Checking??? Southpaw76 Slackware 4 09-03-2006 12:56 PM
dependency checking in slackware? hottdogg Slackware 8 09-02-2006 05:41 PM
Netpkg adds dependency checking jpgu Linux - News 0 12-24-2005 06:53 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 08:45 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
Open Source Consulting | Domain Registration