cygwin winsymlinks:native doesn't work

2019-08-10 00:07发布

问题:

I'm battling with cygwin for quite a while now.
I searched far and wide on how to make cygwin create Windows-style symbolic links.

I tried the following:

export CYGWIN="winsymlinks:native"
export CYGWIN="winsymlinks:nativestrict"
export CYGWIN="winsymlinks:lnk"
  • I also tried exporting w/o the quotes.
  • I also tried from both cygwin/x86 and cygwin/x64

For the life of me - I can't get the Windows native symlinks to work. I'm working on Windows7/64bit; cygwin version 1.7.25.

I'd love to get a solution for this one.

Thank you.

回答1:

I also battled with this one for a while on Windows 7 with Cygwin.

Everything I read seemed to say that it needed export CYGWIN="winsymlinks:native", but no luck for me.

Then I read this blog http://zzamboni.org/blog/making-cygwin-windows-and-emacs-understand-th/ which said that just "winsymlinks" was all you need. Tried that and it worked beautifully :)

Just use this environment variable. export CYGWIN="winsymlinks"



回答2:

I got the same problem. In my case, I used winsymlinks:nativestrict and received an error report saying: Operation is not permitted.

This is becase of Windows UAC and the terminal emulator not being started with elevated privileges. So I run Cygwin mintty as administrator (you can right click the shortcut and choose "Run as administrator" or set the mintty shortcut property: Advanced -> Run as Administrator). After that, everything just works perfectly.