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 11-29-2009, 02:42 PM   #1
With no.Mute
LQ Newbie
 
Registered: Feb 2009
Posts: 22

Rep: Reputation: 0
How to check if i have a dependency already installed?


Hey,

I have been having a great time putting together a nice slackware box, and have been using a lot of slackbuild. I was wondering is there a quick way to see if i have a library or dependency already on my system?
Also what are all the location where libs are placed?
 
Old 11-29-2009, 03:42 PM   #2
rg3
Member
 
Registered: Jul 2007
Distribution: Fedora
Posts: 527

Rep: Reputation: Disabled
You can check which packages are installed by listing the contents of /var/log/packages/. Also, those files list the package contents inside them. They're text files and you can view them with "less" or any text editor. That way, you can use "grep" to find out if you have a specific file somewhere, like a library or a header file.

Note: sometimes it's also a good idea to perform the "grep" on /var/log/scripts/ if you're searching for a library and the results come out empty for /var/log/packages/.
 
Old 11-29-2009, 03:48 PM   #3
niels.horn
Senior Member
 
Registered: Mar 2007
Location: Rio de Janeiro - Brazil
Distribution: Slackware64-current
Posts: 1,004

Rep: Reputation: 91
Short answer: There is no quick and fail-proof way.

That's why dependency checking doesn't work and is not used in Slackware.

Long answer:
If you want to install a certain program, first check if there is a SlackBuild for it on slackbuilds.org If there is, you'll probably find out there which dependencies exist.
If it's not there, check what the author of the program says about needed libraries. Slackware is quite complete and includes many libraries used by popular programs.
You can build your program from source, where it should show what it needs. If you downloaded a package, you can try:
Code:
ldd (your_executable)
to check which libraries are needed.

If you want to know about a specific library (say like libevent) you can check if it is installed from a package with:
Code:
grep libevent /var/log/packages/*
 
Old 11-29-2009, 04:15 PM   #4
Drakeo
Senior Member
 
Registered: Jan 2008
Location: Urbana IL
Distribution: Slackware, Slacko,
Posts: 3,716
Blog Entries: 3

Rep: Reputation: 483Reputation: 483Reputation: 483Reputation: 483Reputation: 483
A program is written by using spare parts. theses spare parts when used together create the program. So lets say I build a program I go to the used parts bin and use these parts to build a program . I must first build a file called.
configure. Configure does that. So open the configure file in your favorite text editor and read it.
just like all programs we need to configure the spare parts and configure is only as good as the programmer that writes it.
configure means link theses libraries then create a make file to make the program.
So every one can rant and rave about the debian aptget or rpm yum yast or even pclinux apt-get rpm. but it all comes down to the programmer. so now you create a make file from configure. then you start to compile it and it stops with an error saying cant find some thing.
That means the configure script missed some thing.
To your answer. Like most it is up to the people that write the scripts to create the dependencies you need. Or they need to build it.

Now you will hear people say Debs and rpm are the best way to go because the programer writes the script that runs another program to find what the configure file asks for. But trust me we are all humans. and does not mean the control file or the spec file written correct.
./configure.
 
1 members found this post helpful.
Old 11-29-2009, 04:30 PM   #5
With no.Mute
LQ Newbie
 
Registered: Feb 2009
Posts: 22

Original Poster
Rep: Reputation: 0
Thanks, this helps a lot.
 
Old 12-01-2009, 09:38 AM   #6
lumak
Member
 
Registered: Aug 2008
Location: Phoenix
Distribution: Arch
Posts: 799
Blog Entries: 32

Rep: Reputation: 111Reputation: 111
If you really wanted to get into the nitty gritty of it all, check out this note at the end of one of the LQ wiki pages. This helps out if you already have a binary compiled and no clue what the compile time dependencies were. Unfortunately, there is no way to check the run time dependencies with this.

http://wiki.linuxquestions.org/wiki/...g_Dependencies
 
Old 12-01-2009, 10:36 AM   #7
Speek
Member
 
Registered: Sep 2003
Location: The Netherlands
Distribution: Slackware
Posts: 124

Rep: Reputation: 41
I often use lspkg to check if a package is installed. Very handy!
 
Old 12-01-2009, 10:59 AM   #8
~sHyLoCk~
Senior Member
 
Registered: Jul 2008
Location: /dev/null
Posts: 1,173
Blog Entries: 12

Rep: Reputation: 129Reputation: 129
Well you can view installed packages using pkgtool. I usually follow the long and monotonous process of ./configure and then if it says "Package X is required/missing" I install that and re-run ./configure. It's quite a scary process if it requires a lot of packages as dependencies.
 
Old 12-02-2009, 05:21 AM   #9
x94qvi
LQ Newbie
 
Registered: Dec 2005
Distribution: Slackware 13.37
Posts: 26

Rep: Reputation: 16
Here's how I do it...

1) If you think that the program you wish to install may have been already installed as part of the base slackware install, then pkgtool will help

2) grep /var/log/packages will also pick up any prepared packages that you may have installed.

3) For those packages that I install manually, I always keep the source in a particular directory on my hard-drive. I can visually scan through the list in this directory to determine if it exists or not, and then I can review the dates/logs to determine if I had successfully installed it or not. It's my own approach to manually organizing & maintaining my packages.

4) updatedb & slocate - If I know that an installed program had also included a particular library, then I would simply updatedb first, then use slocate to find that library somewhere on my HD. If it exists somewhere on my system (in actual system folders), then I'm pretty confident that it's installed - but it's worthwhile scanning everything anyhow to see what program it may have been part of anyhow, as it may have been included as part of another program's source.

These seem to work for me OK, and I hope they work for you.
 
Old 12-02-2009, 07:25 AM   #10
tommcd
Senior Member
 
Registered: Jun 2006
Location: Philadelphia PA USA
Distribution: Lubuntu, Slackware
Posts: 2,230

Rep: Reputation: 293Reputation: 293Reputation: 293
For the slackbuilds at slackbuilds.org, if the page for the slackbuild says that a particular dependency is needed, then you can assume that it is not part of a standard Slackware install. For example, consider the slackbuilds.org page for google-chrome:
http://slackbuilds.org/repository/13...google-chrome/
It says that GConf is needed, so you know that GConf is not part of Slackware. Checking the page for GConf at slackbuilds.org reveals that GConf needs ORBit2, which is also not part of Slackware.
You can use sbopkg to automate the building of multiple slackbuilds, and to check for updates, and other stuff:
http://sbopkg.org/

Last edited by tommcd; 12-02-2009 at 07:27 AM.
 
  


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
F8 install hangs @ dependency check mrclisdue Fedora 5 11-10-2007 08:04 AM
library dependency check matters Slackware 1 06-18-2007 10:22 AM
Dependency check possible? Slovak Slackware 8 12-02-2004 09:56 PM
from source/dependency check TheBman Linux - Software 1 12-30-2003 02:22 AM
Dependency check on old rpm versions marlaina1 Linux - General 2 05-02-2002 03:16 PM

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

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

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