cannot install gmake on Ubuntu 20

hebrerillo

New Member
Joined
Mar 10, 2021
Messages
4
Reaction score
1
Credits
38
Hello everyone!

Is gmake gone on Ubuntu 20? I can use 'make', but not gmake. How can I install gmake on Ubuntu 20?

I have old script using gmake.

Thanks a lot!
 


JasKinasis

Well-Known Member
Joined
Apr 25, 2017
Messages
1,318
Reaction score
1,870
Credits
8,314
gmake is just another name for GNU make - which is the make program you already have installed. Years ago, you used to be able to run it as "make" or "gmake". Nowadays, I think they've stopped using the "gmake" name, you just run it as "make".

So as I see it, you have three relatively trivial choices:
1. Edit your script to change all instances of gmake to make.
OR:
2. Edit your .bashrc to add an alias
e.g.
Bash:
alias gmake="/usr/bin/make"
OR:
3. Create a symbolic link called gmake that points to the make executable.
e.g.
Bash:
sudo ln -s -T /usr/bin/make /usr/bin/gmake

Any one of those three options should solve your problem.
Personally, I'd use Option 1 and just edit the script to use "make" instead of "gmake"!
Option 2 adds a symbolic link called "gmake", which will allow you to type "gmake", or use "gmake" in your scripts and will run the "make" command.
Option 3 uses an alias to do pretty much the same thing as Option 2

NOTE: If you choose to use Option 2 and add an alias to .bashrc, the alias will be available in any new terminals you open up.
If you have any terminals already open, you can run the following command in each open terminal, to reload your .bashrc and make the alias available:
Code:
. ~/.bashrc

I hope this helps!
 
OP
hebrerillo

hebrerillo

New Member
Joined
Mar 10, 2021
Messages
4
Reaction score
1
Credits
38
Hello JasKinasis!

Yes, definitely you helped me! And I will go to solution number 1.

Thank you very much!
 
$100 Digital Ocean Credit
Get a free VM to test out Linux!

Staff online

Members online


Top