Cygwin Make bash command not found
You probably have not installed make. Restart the cygwin installer, search for make, select it and it should be installed. By default the cygwin installer does not install everything for what I remember.
Cygwin ls command not found
- Right click on "My Computer" -> Properties -> Advanced ->
Environment Variables - Add a new environment variable, called
CYGWIN_HOME
and set its value toC:\cygwin
- Edit the PATH environment variable and add
%CYGWIN_HOME%\bin
to it (usually separated by a ';'). - Just click okay, exit any command prompts or bash shells (over cygwin) you may have open, and open it again - it'll work!
Assumption - this assumes that you have installed cygwin at C:\cygwin
. If you've kept it someplace else, please modify the above accordingly.
cygwin on windows does not recognize make
In Cygwin, make is not installed by default. You need to launch Setup.Exe, select make
in the Devel
section, and let Setup download and install it.
Also, depending upon what you are building, you may need to install additional libraries for your build to work.
Cygwin: -bash: make: command not found
1.May be problem with PATH
if you use windows.
2.Try mingw32-make
instead of make
How to run make from Cygwin environment?
You have to install the make
command.
Run the Cygwin installation/configuration program, setup-x86_64.exe
or setup-x86.exe
(you should already have it, downloaded from here). When you get to the screen that lets you select packages to install, find make
and select it (it's probably under "Development" or something similar).
Then you'll be able to run make
from the Cygwin bash command line.
Installing Make in Cygwin
There's a big difference between the 2:
- [GNU]: Automake - Generates Makefile templates
- [GNU]: GNU Make - Builds software from sources (via Makefiles)
So you need to select Make from Cygwin setup.
Notes:
- Automake (or any package, as a matter of fact) is downloaded in the noarch dir, when it's compatible with any OS (Cygwin, in this case) architecture (32 bit and 64 bit (currently)), meaning that it doesn't contain binaries (.exes, .dlls (.sos)), only script-like files
- Make on the other hand, does contain binaries (/usr/bin/make itself it is a binary) and will be downloaded in the appropriate dir (x86_64 or x86)
- The download dir is not the same thing as the installation dir (there may be more than one, and it's under Cygwin installation dir)
For more (generic) details, check [Cygwin]: Installing and Updating Cygwin Packages.
[Cygwin]: Cygwin FAQ - Does the Cygwin Setup program accept command-line arguments? might also be a good starting point for command line options (check [SO]: Installing Make in Cygwin (@PJain's answer)).
Final note: Cygwin is kind of obsolete. Switch to WSL(2), which runs a real Ubuntu (no wrappers / adapters) as a VM (in Hyper-V - which runs at a totally different level).
Cygwin doesn't recognize make command despite it being installed and in the bin folder
Please see below changes which will help you to set the PATH variable correctly with cygwin.
You can perform the following changes.
Open the file profile.bashrc present in etc/ directly where cygwin is installed.
Add below lines.
# Save Windows path variable
export WINPATH=$PATH
export PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin
Open bash.bashrc file present in etc/ directly where cygwin is installed.
Add below lines
# The next block is only needed in case somebody starts a shell without --login parameter in the beginning (no /etc/profile invoked)
# The WINPATH variable is set in /etc/profile and contains the original Win PATH variable content
if [ -z "${WINPATH}" ] ; then
export WINPATH=$PATH
fi
# Set PATH variables
export PATH=/bin:/usr/bin:/usr/sbin:/usr/local/bin:${WINPATH}
export MANPATH=/usr/local/man:/usr/share/man:/usr/man
cywin bash script command not found when called from batch
Put your cygwin bin directory (likely C:\cygwin\bin
) on your PATH environment variable.
This would also give you the benefit of being able to use commands like tar
, ls
, rm
, etc. from a regular console windows and not just a Cygwin console.
Related Topics
C++11 Emplace_Back on Vector<Struct>
Writing Python Bindings for C++ Code That Use Opencv
Qt: How to Handle the Event of the User Pressing the 'X' (Close) Button
Is There a Downside to Declaring Variables with Auto in C++
Serial Port (Rs -232) Connection in C++
Why Doesn't C++ Have &&= or ||= for Booleans
Class Template for Numeric Types
Generating One Class Member Per Variadic Template Argument
Why Do C++ Streams Use Char Instead of Unsigned Char
No == Operator Found While Comparing Structs in C++
Macro/Keyword Which Can Be Used to Print Out Method Name
Pointing to a Function That Is a Class Member - Glfw Setkeycallback
C++11 Is_Same Type Trait for Templates
Is Is a Good Practice to Put the Definition of C++ Classes into the Header File
Is Gcc Std::Unordered_Map Implementation Slow? If So - Why
How to Perform Atomic Operations on Linux That Work on X86, Arm, Gcc and Icc