How to check if i have a dependency already installed?
SlackwareThis Forum is for the discussion of Slackware Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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?
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/.
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:
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.
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.
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.
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.
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/
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.