Cygwin / cygdrive / c no such file or directory

Host System: Windows Server 2008 32-bit Installed: Cygwin

I don't know when this problem started, but one of my Rails gems uses a command which

to locate the location of a system-installed executable. In my circumstance, it returns /cygdrive/c/Windows/System32/pngcrush

- and the file is not available.

In cygwin terminal and windows cmd I get this:

ls -la /cygdrive/c

= No such file or directory

mount

=

C:/cygwin/bin on /usr/bin type ntfs (binary,auto)
C:/cygwin/lib on /usr/lib type ntfs (binary,auto)
C:/cygwin on / type ntfs (binary,auto)
B: on /cygdrive/b type smbfs (binary,posix=0,user,noumount,auto
C: on /cygdrive/c type ntfs (binary,posix=0,user,noumount,auto)

      

Running cd /

in Windows Terminal leads me toC:\

cd /cygdrive

= The system cannot find the path specified

FURTHER EDITION:

I can access the disks using /c

for example, but just not /cygdrive/c

what it returns which

.

+3


source to share


2 answers


I found the answer at superuser.com; moving C:\cygwin\bin

to the beginning of the PATH variable fixed the problem.



+3


source


This fix was necessary, but not enough for me; one more fix is ​​needed. I was getting an error when running Bourne shell scripts that referenced other files on localFS. All paths have been verified. It was only when I was using Sys Internals procmon for troubleshooting that I noticed an extra char at the end of the path that was not resolved. Viewing the shell script in Notepad ++ with View / Show Symbol / Show All Characters showed that the Windows style line [CR] [LF] is not Unix [LF]. Cygwin sh.exe included [CR] at the end of the path, resulting in the file not being found. I used cygwin d2u to convert line ends and the problem was fixed.



+1


source







All Articles