Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Everyone at some point or another must have installed a program from source in Linux. I very often find myself downloading a program I want to install, run through the "./configure" and lots of error message pops up saying you don't have this or you don't have that etc .. etc..

My question is, is there a website that clearly shows you the dependencies of that particular program? Some have it in the "README" file, but most don't even bother. Is there a way to find all the dependency without going through the "./configure" command?

share|improve this question
2  
Ask on superuser.com –  Donnie Nov 30 '09 at 13:09
add comment

migrated from stackoverflow.com Nov 30 '09 at 15:58

This question came from our site for professional and enthusiast programmers.

6 Answers

As a limited case, if you are installing from source to get an update to a program that is already installable through the package manager, you can install the build dependencies of the version in the package manager, and this should get all or most of the build-deps of the new version

share|improve this answer
add comment

Many distributives have a package managers which tasks is resolve the dependencies. If your distributive don't have a package manager you can find the dependencies based on other distributive packages. For example, debian packages.

For example for mutt.

I don't know how you can find all dependencies if there is not a package.

share|improve this answer
add comment

Because various distributions name packages differently, this is extremely difficult to accomplish. For instance, on Debian, a package may be named libfoo, and its counterpart development package libfoo-dev. On RHEL/CentOS it might be libfoo1 and libfoo1-devel.

A well written configure.ac (which is used to generate the 'configure' script) should tell you, in a meta way, what package you are missing. I.e.

Checking for libfoo ... no
Checking for libfoo usability .... no
./configure: Error: You are missing the package 'libfoo' and possibly
'libfoo-dev(el)'

This lets you apt-cache / yum search for something to install, if the errors preceding the configure: Error: aren't obvious. Googling configure's output usually bears fruit to find out just what package you are missing.

The real problem comes when the version of libfoo your distro offers is too old for the program you are trying to compile. In that case, you must build libfoo itself, install it separately from the version provided by your distro and tell the program how to link to it (also done via 'configure')

For this reason, I usually use fast moving distributions (I.e. Ubuntu) for my development machine. Usually, I can find what I need, up to date in the universe repository.

I just had to upgrade glibc on a Debian Lenny machine just to be able to build and install a multi threaded AIO based AoE target, plus roll my own 2.6.31.6 kernel because the program wanted eventfd support. I feel your pain :)

Yet, this is part of the fun of building your own stuff .. once it works, you are doubly satisfied .. or doubly frustrated if it doesn't :)

share|improve this answer
add comment

RPMFIND.NET list "Required" packages for anything it know of.

YUM and APT (RedHat and Debian based distributions respectively) exist largely for just this purpose, but also let you install the packages as well. Whoo-Hoo

share|improve this answer
add comment
  1. Check on the project's website - they will most probably list the dependencies.
  2. Don't worry about some checks / fails that are not errors. For example most projects using autoscan will check for awk, gawk, mawk, etc... but it doesn't matter if you install one/all of them.
  3. If configure actually stops with an error at some library, just search for the name it reports. apt-cache search ... / yum search / google is all you need usually.
share|improve this answer
add comment

There are programs that will find out dependencies while you build software. They watch the build process, stop it when it needs a file, installs a package that provides that file and resume the build process.

For example, in Debian there is auto-apt.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.