【问题标题】:conflicting cygwin and windows pathcygwin和windows路径冲突
【发布时间】:2010-04-10 13:43:51
【问题描述】:

如果我的 Windows 路径如下所示:

c:\ruby\bin;c:\cygwin\bin

然后当我进入 cgywin 并输入“ruby”时,它将从 c:\ruby\bin 执行 ruby​​,找不到安装在我的 cygwin 中的 ruby​​。我必须排除该路径,以便 cygwin 执行 /usr/bin 中的路径。

但我需要这 2 条路径,因为我也想在 Windows 中运行 ruby​​。

无论如何让cygwin有自己的路径而不是继承windows中的路径?

谢谢。

【问题讨论】:

    标签: windows path cygwin


    【解决方案1】:

    在您的 .profile 中添加一个条目,以将路径设置为您希望它在 cygwin 中的任何内容。

    在 cygwin 中运行命令:

    $ <favourite text editor eg vi> ~/.profile
    

    然后将 PATH 环境变量设置为您想要的任何值,例如:

    export PATH=/cygdrive/c/cygwin/bin
    

    注意我不记得你是否可以使用 c:... 版本的路径,但如果你发出 env 命令你会看到它应该是什么。

    【讨论】:

      猜你喜欢
      • 2011-09-29
      • 2017-03-07
      • 2021-03-09
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2013-03-14
      相关资源
      最近更新 更多