主机系统:Windows Server 2008 32位
安装:Cygwin
我不知道这个问题是什么时候开始的,但是我的一个 Rails gem 使用了命令 which
以确定系统安装的可执行文件的位置。在我的情况下,它返回 /cygdrive/c/Windows/System32/pngcrush
- 并且文件无法访问。
在 cygwin 终端和 Windows cmd 中,我得到以下信息: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)
运行
cd /
在 Windows 终端带我到 C:\
cd /cygdrive
= The system cannot find the path specified
进一步编辑:
我可以使用
/c
访问驱动器例如,但不是 /cygdrive/c
这是什么which
返回。
最佳答案
我找到了 the answer在 superuser.com 上;搬家C:\cygwin\bin
PATH 变量的前面修复了这个问题。
关于Cygwin/cygdrive/c 没有这样的文件或目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/25624753/