无法从PATH环境变量中删除cygwin [英] Unable to remove cygwin from PATH environment variable

查看:61
本文介绍了无法从PATH环境变量中删除cygwin的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近不得不重新安装Cygwin,这样做时,我遇到了某些应用程序的问题,因为Cygwin似乎附加到了我的PATH环境变量中.我已尝试按照以下说明

解决方案

Windows中有两个PATH变量.两者均可在该页面上获取环境变量.一个在顶部窗格(用户变量)中,另一个在第二窗格(系统变量)中.它们都被称为PATH,但是它们是独立且不同的实体.启动cmd.exe时,最终得到的PATH变量是将这两个变量组合在一起的结果.要解决您在此处看到的问题,请返回环境变量"窗格并检查两个版本(用户"和系统").根据上面的PATH变量,我怀疑用户PATH将包含以下三个条目:

  C:\ blp \ DAPI;C:\ blp \ DAPI \ DDE;C:\ Apps \ cygwin64 \ bin 

那是cmd.exe PATH中唯一的功能差异,而在像SYSTEMROOT这样的变量展开之后,其他功能才有所不同.您应该可以在那里删除Cygwin目录.

I recently had to reinstall Cygwin and in doing so, I have ran into a problem with some application because Cygwin seems to be appended to my PATH environment variable. I have tried to remove this by following these instructions https://www.java.com/en/download/help/path.xml but something strange happens. If I look at the value of Path under 'Environment Variables', Cygwin is not there; however if I type PATH in cmd.exe, I see Cygwin gets appended at the end of the PATH. Can you please help me to know to remove Cygwin from the PATH?

As an example, this is what I see in the Environmental Variables window Path value:

Path=C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;c:\Oracle\11g_R2_x64\Administrator\11.2.0\client_1\bin;C:\ProgramData\Oracle\Java\javapath;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;%SYSTEMROOT%\System32\WindowsPowerShell\v1.0\;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;%systemroot%\System32\WindowsPowerShell\v1.0\;C:\Apps\Anaconda3;C:\Apps\Anaconda3\Scripts;C:\Apps\Anaconda3\Library\bin

And this is what I see in cdm.exe:

PATH PATH=C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Clien t\;c:\Oracle\11g_R2_x64\Administrator\11.2.0\client_1\bin;C:\ProgramData\Oracle\ Java\javapath;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS \System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C: \Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Int el(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Man agement Engine Components\IPT;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\App s\Anaconda3;C:\Apps\Anaconda3\Scripts;C:\Apps\Anaconda3\Library\bin;C:\blp\DAPI; C:\blp\DAPI\DDE;C:\Apps\cygwin64\bin

As you can see, I have Cygwin in the second case, whereas I don't have it on the first case.

UPDATE:

Thanks to Patrick for his answer below. Just to complement, in Windows you should be able to edit both the user and system environment variables from the Control Panel as in this screenshot:

解决方案

There are two PATH variables in Windows. Both are available on that page for environment variables. One is in the top pane (User variables) and the other is in the second pane (System variables). They are both called PATH, but they are separate and distinct entities. When you launch cmd.exe, the PATH variable you end up with is the result of combining those two variables. To fix the problem you are seeing here, return to the Environment Variables pane and check both versions (User and System). Based on your PATH variables above, I suspect the User PATH will contain the following three entries:

C:\blp\DAPI; 
C:\blp\DAPI\DDE;
C:\Apps\cygwin64\bin

That's the only functional difference in your cmd.exe PATH and the other on after variables like SYSTEMROOT are expanded. You should be able to delete the Cygwin directory there.

这篇关于无法从PATH环境变量中删除cygwin的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆