在win7 64位系统下使用cygwin运行 liunux程序出现 bash-3.02$的问题:
原因是因为:
原来在64位的操作系统中,32程序和64位程序读取的是位置的注册表项,HKEY_LOCAL_MACHINE\Software在 64位版本的注册表编辑器中对应的是64位程序的注册表项,而32位注册表项被映射为HKEY_LOCAL_MACHINE\Software\WOW6432Node。如果要两个版本都生效的话,需要同时修改这两个地方的表项。
参考资料:http://www.cnblogs.com/TianFang/archive/2011/08/07/2129872.html
所以把一下内容保存后另存为.reg文件,然后双击运行即可解决问题:
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions]
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin]
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2]
"cygdrive prefix"="/cygdrive"
"cygdrive flags"=dword:00000022
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/]
"native"="C:\\cygwin"
"flags"=dword:0000000a
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/bin]
"native"="C:\\cygwin/bin"
"flags"=dword:0000000a
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\mounts v2\/usr/lib]
"native"="C:\\cygwin/lib"
"flags"=dword:0000000a
[HKEY_LOCAL_MACHINE\SOFTWARE\Cygnus Solutions\Cygwin\Program Options]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions\Cygwin]
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions\Cygwin\mounts v2]
"cygdrive prefix"="/cygdrive"
"cygdrive flags"=dword:00000022
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions\Cygwin\mounts v2\/]
"native"="C:\\cygwin"
"flags"=dword:0000000a
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions\Cygwin\mounts v2\/usr/bin]
"native"="C:\\cygwin/bin"
"flags"=dword:0000000a
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions\Cygwin\mounts v2\/usr/lib]
"native"="C:\\cygwin/lib"
"flags"=dword:0000000a
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Cygnus Solutions\Cygwin\Program Options]