JIYIK CN >

Current Location:Home > Learning > OPERATING SYSTEM >

How to fix the error Make Command Not Found in Cygwin

Author:JIYIK Last Updated:2025/03/21 Views:

Cygwin allows Windows users to access certain Linux features and includes a large number of GNU and open source tools that are commonly found in popular Linux distributions.

When using Cygwin, it is easy to encounter a command not found error message; in our case, it was the make command not found. This error message appears when the make utility is not available in our terminal.

This article will discuss the method to deal with bash: make: command not found in Cygwin.


Solve bash: make: command not found in Cygwin by installing

The make utility allows us to build, maintain, and compile large programs or groups of programs and automatically determine which parts of a large program need to be recompiled and use certain parameters or arguments to recompile such programs.

The structure of a typical make command is as follows, and a makefile is usually used.

make [ -f makefile ] [ options ] ... [ targets ] ...

In the Cygwin terminal, we can use the make utility; however, depending on how we installed it, we may not be able to access it and may not find the make command.

To check if make is available in your Cygwin terminal, accessing make directly or through its debug mode will give you output or errors. If it gives you make command not found errors, then it does not exist.

make command not found

So if you use the make command with other parameters, you should see an error message similar to the one above. Now that we have determined that this is because the make utility or package does not exist, the goal is to install it.

Using the Cygwin installation file setup-x86_64.exe, which you use to install the terminal in a package, we can update our existing installation by selecting a package.

You can update an existing installation using the make utility in a Cygwin terminal by following the steps below.

  1. Go to your setup-x86_64.exe and start the installation just like you did when you first installed Cygwin. If you happened to delete that file, you can go to the Cygwin installation section and download the installation file (about 1.3 MB).

    Select the installation file

  2. Select the same download source and root installation directory as last time to prevent any problems. Also, the installation conditions must be identical to prevent two Cygwin terminal instances from appearing.

    Select the installation type

    Select the installation directory

  3. Select the same Local Package Directory as last time, but if you don't remember, leave it as recommended.

    Select the local package directory

  4. Select your internet connection and then the download site; the first one is the most preferred.

    Select Download Site

    Downloading

  5. Change the View tab to Full, search for make in the search field, and scroll to find make in the list of packages (highlighted). Remember to double-click the Skip value to see the version.

    Additionally, you can select make-debuginfo to allow easy debug mode. Select Next.

    Select Package

  6. Check the Review and Confirm Changes screen to ensure installation.

    View changes

  7. You should have a download progress like the image below.

    Download progress

  8. The update installation is complete and we can now use the make utility through the Cygwin terminal.

    Installation Complete

Now, let's use the make command to see if we get the same error. If we use the make command, it will give us a make error telling us that the target was not specified and the makefile was not found.

This shows that we have delivered.

make

Now, let's check the version (a final check to make sure make is available to you) using the following command.

make -v

Output:

GNU Make 4.3
Built for x86_64-pc-cygwin
Copyright (C) 1988-2020 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.

make -v


Solve bash: make: command not found in Cygwin with apt-cyg

If you have apt-cyg, the package manager utility that allows you to keep track of installed packages on Cygwin, then you can easily solve the problem of the make command not being easily found.

Using apt-cyg, you can install, remove, download, and retrieve packages, among other operations. Here, we will install make using apt-cyg using the following command.

apt-cyg install make

When we use the above command in Cygwin, it should produce the following result.

apt-cyg install make

apt-cyg install make complete

Now, let's check that the operation was successful by checking the version of make.

make -v

make -v cyg

Assuming you don't have apt-cyg, this is a great tool on Cygwin that allows you to install, update, or remove packages without having to repeat the installation process as in the previous section.

In this case, you will need to do an update installation using the Cygwin installation file, just one more time. After the last time, you will not need the file again.

After starting the update installation process, once you reach the "Select Packages" screen, search for lynx and install it. Then, open your Cygwin terminal and enter the following commands one after the other.

lynx -source rawgit.com/transcode-open/apt-cyg/master/apt-cyg > apt-cyg
install apt-cyg /bin

The last command installs apt-cyg, which will now be used to install any additional packages or utilities that are not present in your existing installation.

apt-cyg -v

You can check if the apt-cyg installation is complete using the apt-cyg -v command. Also, with a simple command, you can download any package or utility.

apt-cgy install utility-name

Previous:Error handling in Bash

Next: None

For reprinting, please send an email to 1244347461@qq.com for approval. After obtaining the author's consent, kindly include the source as a link.

Article URL:

Related Articles

Error handling in Bash

Publish Date:2025/03/21 Views:93 Category:OPERATING SYSTEM

This article introduces error handling in bash. Remember, understanding exit codes, options such as errexit and trap allow us to build robust scripts and manage bash problems more effectively. Exit Codes in Bash Handling errors based on exi

Getting the absolute path in Bash

Publish Date:2025/03/21 Views:60 Category:OPERATING SYSTEM

In this Bash article, we will learn different ways to get the absolute path in Linux. We will also learn some different Linux commands to get the absolute path of a file. Before we begin, we need to understand the basic concepts of absolute

Difference between Bash Nohup and &

Publish Date:2025/03/21 Views:151 Category:OPERATING SYSTEM

This short article introduces the nohup command and the control operator to run Linux processes in the background through Bash. In addition, we will further study the key differences between nohup and . Running Linux Processes in the Backgr

Renaming Files in Bash

Publish Date:2025/03/21 Views:89 Category:OPERATING SYSTEM

With the help of Bash scripts, you can automate your tasks. File renaming is a common task on various systems. You can rename all the files manually. However, if your file names have a sequence, it is better to automate this task. This way

Open Emacs in Bash

Publish Date:2025/03/21 Views:141 Category:OPERATING SYSTEM

This article will show you how to open Emacs from within Bash. We will also discuss how to install the Emacs text editor. Install EMACS in your system Suppose you don't have Emacs in your system. You can easily install it in your system wit

Clear the Terminal Screen in Bash

Publish Date:2025/03/21 Views:145 Category:OPERATING SYSTEM

There are various ways to clear the terminal in bash script. This article will discuss 3 methods to clear the terminal. Use tput reset to clear the terminal screen. The first method uses the keyword tput reset to clear the screen. When your

Reload .bash_profile from the command line

Publish Date:2025/03/21 Views:67 Category:OPERATING SYSTEM

In the shell, .bash_profile is used to customize the configuration of user settings. It is stored in the root directory or home directory and is mostly hidden from other users. This file holds all the configuration of the shell and is also

Check if input parameter exists in Bash

Publish Date:2025/03/21 Views:191 Category:OPERATING SYSTEM

When we create a Bash script, we may want to use parameters in our script to run successfully. Therefore, we need to create a script to check the number of input parameters used by the user in the script. All of this prevents unexpected beh

Getting optional input arguments in Bash

Publish Date:2025/03/21 Views:180 Category:OPERATING SYSTEM

Sometimes we need to create a dynamic function which can be executed in both without passing any arguments or without passing any arguments. For this we need to set some default values ​​for those arguments so that if the arguments are

Scan to Read All Tech Tutorials

Social Media
  • https://www.github.com/onmpw
  • qq:1244347461

Recommended

Tags

Scan the Code
Easier Access Tutorial