Cygwin路径错误:找不到模块'C:\ cygdrive \ c \ ...' [英] Cygwin Path Error: Cannot find module 'C:\cygdrive\c\...'
问题描述
我在Windows 7上使用Cygwin,并且按预期工作,直到几天前我对其进行了更新.
I am using Cygwin on Windows 7 and it was working as expected until I updated it a couple of days ago.
现在,当我尝试为NodeJs应用程序运行makefile时,出现有关路径的错误.在错误堆栈中,我看到所有路径都具有对C驱动器的双重引用:
Now when I try to run a makefile for my NodeJs app I get the errors about paths. In error stack I see all the paths have double reference to C drive:
C:\cygdrive\c\...
更新:在Git bash,Windows命令行和Cygwin Shell中复制.
Update : Reproduced in Git bash, Windows command line and Cygwin shells.
有什么办法解决这个问题吗?
Any ideas how to fix this?
推荐答案
确保 C:\ cygdrive \ c
路径是到 C的本机Windows风格的符号链接:\
,因为这是该路径的预期行为.
Make sure the C:\cygdrive\c
path is a native, Windows-style symbolic link to just C:\
as that is the expected behavior of that path.
默认情况下,cygwin创建UNIX风格的符号链接,在许多情况下都无法正常工作.因此,您需要明确告诉cygwin在这里做什么.
By default, cygwin creates a UNIX-style symbolic link, which won't work well in many cases. So you need to explicitly tell cygwin what to do here.
这是从Cygwin内部进行的操作:
Here's how, from inside of Cygwin:
export CYGWIN="winsymlinks:native"
cd C:/cygdrive && rm -rf c && ln -s -v C:/ c
这篇关于Cygwin路径错误:找不到模块'C:\ cygdrive \ c \ ...'的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!