Fix Make Command Not Found Error on Ubuntu

3

Nowadays, now we have advanced at an exquisite fee in the case of era and digitization. Almost each process which might had been a bother is a click on away because of trendy era. We can construct packages thru easy-to-use gear that save us time and facilitate day by day lifestyles.

But what if we’re confronted with a state of affairs the place we don’t have those gear, or possibly we wish to construct an software from scratch or tweak positive sides of it? Linux distributions resolution this query via presenting crucial command within the Linux arsenal, the ‘make’ command.

Make command is without doubt one of the most generally used instructions on Linux distributions, which gives a pathway to obtain polished variations of the developer’s gear to your gadget. However, its pivotal function lies in construction or compiling whole systems by the use of supply code. ‘Make’ is a command which is most often used to construct dependencies like executable information or libraries the usage of a supply code. It is also most often known as a command that transforms some code into one thing tangible that can be utilized and thought to be desired outcome or part of it.

This command works on a elementary degree, from compiling supply information to object information, which in flip offers us executable information for more than a few systems we run.

Working of the Make command

Make command assumes command-line arguments handed to it from the goals. The detailed data of those goals is contained within the ‘makefile’. Makefile is synonymous with a knowledge ledger containing goals and movements to be carried out on those goals. The ‘makefile’ is the primary report this is scanned each time the make command is achieved.

The make report comprises all dependencies and an inventory of movements to accomplish. If those dependencies are the specified goals, the makefile scans goals and develops their repositories, which might be transferred to make instructions for the compiling procedure. Even if we change a make a selection choice of supply information, executing the make command later on compiles the article information in relation to the changed supply report, thereby saving time and sources.

It must be famous that the make command has more than a few arguments, as said above. Not together with the arguments would possibly outcome within the construction of the primary goal this is observed via its makefile. This goal is typically “all”.

Make: command no longer discovered treatment

Make is crucial command, so it comes pre-loaded in lots of Linux distros. However, from time to time it must be downloaded or throws an error for “command not found”.

We pass throughout the steps to test and unravel the problem targeted round creating a command within the following steps.

First and principal, we test whether or not make is even provide on our gadget. To examine, we use the ls serve as to inspect the content material of /usr/bin/make listing.

$ ls /usr/bin/make

$ /usr/bin/make –version

Using the aforementioned, we will test its edition the usage of.

In case we don’t have a make command to your gadget, we will simply set up it via issuing the next instructions.

This command will more than likely paintings if one makes use of Ubuntu 18.04 or later. In case it does no longer, or we’re on an older edition, we will use the oblique way of downloading the build-essential bundle via typing in.

$ sudo apt set up build-essential

This bundle comprises all important information associated with report compilation and construction. Make is part of this bundle, so we can even have put in the make command.

In case now we have damaged applications or your make command problems mistakes, we will all the time uninstall and reinstall later on for a solid restart. This would possibly unravel your downside.

Reinstall the usage of.

$ sudo dpkg-reconfigure make

Syntax

General syntax of make command is.

$ make [ -f makefile][options][target(s)]

Flags with make: Make command comes with a number of flags that dictate how the information to assemble can be treated. These flags are in brief described beneath.

  • -b: This is most commonly an left out choice however is also incorporated in positive variations of constructing.
  • -B: This choice dictates that every one goals e carried out with the make and due to this fact compiled.
  • -C dir: This choice states the gadget to switch listing to dir earlier than imposing the make command.
  • -d: This is an elaborate choice that permits the person to view how make is compiling the information. This choice offers with debugging because it shows entire data of the report underneath operation and the way it’s being processed.
  • –debug[=FLAGS]: This choice does the similar process as the former one, which is debugging. However, right here, we would possibly upload flags like a for all debugging output, m for debugging whilst remaking make information, v for verbose elementary debugging, and plenty of extra. These flags and their main points will also be discovered at the make command guy web page.
  • -f report: This is crucial choice this is most often incorporated within the make report procedure. It issues to the “file” specified and plays the make operation on it. It is also written as –makefile=report.
  • -e: This is an override choice that permits priority of surroundings variables over the makefile variables.
  • -i: This choice allows make to forget about all mistakes.
  • -j[jobs]: This choice specifies the roles(instructions) to be carried out concurrently.
  • -k: This choice directs make command to stay going. For example, error as made in goal, the make command continues regardless and processes the opposite dependencies of the objective with out error correction.
  • -l[load]: This command specifies that no new jobs/instructions be initiated in case there are earlier jobs underneath processing. If no argument is equipped, the former load restrict is got rid of.
  • -n, –just-print: choice allows command printing with out execution.
  • -o report: assumes the given report is previous and its regulations are left out.
  • -p: prints database and edition via studying the makefiles.
  • -q: returns binary values; 0 for up to the moment goals, non 0 differently.
  • -R: Dictates make command to not outline any integrated variables.
  • -S: counters okay choice and prevents operation from conserving ongoing.
  • -s: This is the silent operation; it received’t print instructions as they’re achieved and helps to keep processing backend.
  • -t: contact information, as in mark them up to the moment with none execution by any means.
  • -v: Displays edition of show command.
  • -w: An invaluable choice when one has to stay test of mistakes. This choice prints messages after processing the report.
  • –no-print-directory: Undoes the operation of the –w choice.
  • –warn-unidentified-variables: Warn in case an undefined variable is referenced.

Most choices had been coated right here; if you want for an up to date checklist with an in depth rationalization, head over to make instructions manpage right here.

Conclusion

This article went over the operating of make, a important command with elementary but tough packages. We explored more than a few choices to mend problems encountered with its implementation. Moreover, we went over its detailed paintings. We hope our article helped unravel your queries and fasten any problems you’ve gotten encountered.

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More