Ask Your Question

Automatically install dependencies from a configure script?

asked 2014-06-19 15:33:07 -0600

officialdogs gravatar image

updated 2014-09-29 00:21:36 -0600

mether gravatar image

Whenever it comes time to build a project from source, my process can pretty much be summarized as follows:

  1. run ./configure
  2. it fails due to a missing requirement (eg. checking for NETWORKMANAGER... no)
  3. try to install the missing package through yum by guessing its name (eg. sudo yum install networkmanager networkmanager-devel network-manager network-manager-devel)
  4. if that fails, take to Google and try to find the name of the package in the repos
  5. finally install the correctly named repo via yum (eg. sudo yum install NetworkManager-devel)
  6. go back to 1 until all requirements are met
  7. make and sudo make install

I can't help but feel like there's something simple that I'm overlooking here that makes the process less touch-and-go.. What's the general case for these types of things? Is there anything (built-in or otherwise) that simplifies the process?

edit retag flag offensive close merge delete



What are you building, specifically? Perhaps someone knows a better way.

randomuser gravatar imagerandomuser ( 2014-06-20 11:40:51 -0600 )edit

2 Answers

Sort by ยป oldest newest most voted

answered 2014-06-20 02:38:31 -0600

sideburns gravatar image

Instead of guessing at the name, use yum properly. Your first step is:

yum info packagename

If you've got the name right, you'll find out what the package is, and if it's installed. (You may have network manager installed, but not the devel package as an example.) If that doesn't work, try this:

yum provides packagename

You may need to use packagename* if you're not sure about the complete name. Note that neither of these commands needs root. Once you know the name, you can install it and try again.

edit flag offensive delete link more


using yum info is a lot less annoying than Googling, thank you

officialdogs gravatar imageofficialdogs ( 2014-06-20 10:41:28 -0600 )edit

The application is also a great place to search the Fedora package set.

FranciscoD_ gravatar imageFranciscoD_ ( 2014-06-26 23:48:51 -0600 )edit

answered 2014-06-20 03:16:45 -0600

NickTux gravatar image

makes the process less touch-and-go..

Most of the Bash scripts are for general use. They are not intended or specific for a single distribution (e.g. Fedora). For that reason, a script cannot be modified (by the author) to meet the needs of a specific distribution (e.g. configure and install dependencies automatically on Fedora or Debian). Because different distributions have different package managers and package names.

So, the configure/build/install from source procedure couldn't be less touch-and-go, as you've said. You have to search and find the missing packages/dependencies and install them manually through (yum in this case) package manager.

edit flag offensive delete link more

Question Tools

1 follower


Asked: 2014-06-19 15:33:07 -0600

Seen: 737 times

Last updated: Jun 20 '14