cygwin1.dll not available error when installing Cygwin
I am unable to make Cygwin work properly.
After download the Cygwin setup files (either the 32-bit version setup-x86.exe
or the 64-bit version setup-x86_64.exe
) from the Cygwin website, I ran it to install Cygwin on my 64-bit Windows 7.
I chose the installation directory, the directory where to download the packages, and one mirror server. Cygwin created the directory succesfully, downloaded the package list and displayed the package selection screen.
I just clicked Next to advance using the default selection, and Cygwin showed me the list of packages to be installed. Then, it downloaded all packages and started to install them.
Then it started displaying several times the well-known error message:
The program can't start because cygwin1.dll is missing from your computer. Try reinstalling the program to fix this problem.
This happens when some of the default packages try to run dash.exe
or bash.exe
to configure themselves.
Some Googling suggested:
- Reinstalling Cygwin choosing only the base packages. Since I had chosen no packages to be installed, this was already the "minimal" setting;
- Adding Cygwin's
bin
directory to the PATH environment variable. Unfortunately thecygwin1.dll
was never downloaded/installed, so even doing this didn't help.
The cygwin1.dll
file is not available for direct download from the Cygwin website (at least not visible from the Installation page).
How can I fix this basic installation?
It turns out that, for some reason, the package cygwin
itself (which seems to contain the dreaded cygwin1.dll
) was not selected by default, or some installation mishap happened the first time and it could not be installed until after some of the errors appeared.
After selecting the cygwin
package for installation, and adding the bin
directory of Cygwin to the PATH, only then I was able to install the other packages and run the Cygwin shell.
I find it odd that none of the first results in Google seemed to suggest this possibility (adding a package to be installed). It happened when trying to install both the 32-bit Cygwin and the 64-bit Cygwin. For those reasons I added this question to SU, hoping it may help someone.