问题
I am using Cygwin on Windows 7 and it was working as expected until I updated it a couple of days ago.
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\...
Update : Reproduced in Git bash, Windows command line and Cygwin shells.
Any ideas how to fix this?
回答1:
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.
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.
Here's how, from inside of Cygwin:
export CYGWIN="winsymlinks:native"
cd C:/cygdrive && rm -rf c && ln -s -v C:/ c
回答2:
If you search for similar question you'll find what you look for. I think this post answers your question quite well https://superuser.com/questions/291818/cygwin-cygdrive-paths-and-windows-command-prompt/291820#291820
来源:https://stackoverflow.com/questions/29172317/cygwin-path-error-cannot-find-module-c-cygdrive-c