Simple example of using Fedora alternatives to install old version of make
5,256
- 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.
- 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. - 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. - Use
alternatives --display make
to see what is being used.
Related videos on Youtube
Comments
-
Mr. Shickadance almost 2 years
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. -
jsbillings over 13 yearsCommenting 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. -
Mr. Shickadance over 13 yearsThanks for the clear answer! This worked like a charm and cleared up confusion around the alternatives system.
-
Mr. Shickadance over 13 yearsHmm, thanks for the suggestion. I'll be sure to check that out.
-
mattdm over 13 years+1 for "the right answer is don't do this".
-
Mr. Shickadance over 13 yearsAt any rate I think I'll be able to better use alternatives, if I find the right situation. ;)