Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can anyone help me using the Fedora alternatives system in order to install an old version of make? I know the actual program is irrelevant, but I need it so I'll use it as my example.

I currently have make-3.82 installed on my Fedora 14 box, but I need to have 3.81 installed to build the android kernel. I already downloaded the 3.81 source and built it, but now I want to install it alongside 3.82 and be able to switch between them using Fedora alternatives.

Now I installed make-3.81 from source into /usr/local, how would I use alternatives to achieve my goal? I know I must use the alternatives command, but so far my attempts have failed and I would like a concrete example.

share|improve this question
up vote 5 down vote accepted
  1. You need to 'alternative-ize' the original make. Change /usr/bin/make and /usr/bin/gmake to /usr/bin/make-3.82 and /usr/bin/gmake-3.82. Realize that it'll get blown away next time make is upgraded, because Fedora does not use the alternatives for make.
  2. Create an alternative for it. alternatives --install /usr/bin/make make /usr/bin/make-3.82 10 for make. I used 10 as the priority to make it a lower priority than the next step.
  3. Now create an alternative for your new make. alternatives --install /usr/bin/make make /usr/local/make-3.81/bin/make 20 (assuming you installed it in /usr/local/make-3.81). notice I used a higher priority, 20.
  4. Use alternatives --display make to see what is being used.
share|improve this answer
Commenting on my own answer: the alternatives system is probably not the best solution to this problem. You might benefit from Environment Modules (modules.sourceforge.net), or just manually setting the old make in your PATH or the Makefile. – jsbillings Feb 17 '11 at 17:26
Thanks for the clear answer! This worked like a charm and cleared up confusion around the alternatives system. – Mr. Shickadance Feb 17 '11 at 17:29
Hmm, thanks for the suggestion. I'll be sure to check that out. – Mr. Shickadance Feb 17 '11 at 18:24
+1 for "the right answer is don't do this". – mattdm Feb 17 '11 at 18:33
At any rate I think I'll be able to better use alternatives, if I find the right situation. ;) – Mr. Shickadance Feb 17 '11 at 20:16

Your Answer


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.