【问题标题】:.bash_profile conflicting with .profile preventing node from running.bash_profile 与 .profile 冲突,阻止节点运行
【发布时间】:2015-01-30 22:26:12
【问题描述】:

按照说明,我在 .bash_profile 中设置了我的 ruby​​ 环境,并在 .profile 中安装了 MacPorts。我已经使用 MacPorts 安装了节点,但 .bash_profile 和 .profile 之间似乎存在冲突。 Node 在安装时工作,但它没有工作,除非我在终端中删除 .bash_profile 或加载 .profile。

我对设置环境还是新手,所以我不确定我是否可以将 .bash_profile 和 .profile 结合起来以避免这种冲突,或者是否有更好的解决方案。

【问题讨论】:

    标签: node.js macports rbenv .bash-profile .profile


    【解决方案1】:

    您可以将 MacPorts 所需的修改移动到 $PATH 任何您想要的地方。如果这样可以解决问题,请将其移至 .bash_profile

    查看$PATH 的值,当您的设置有效与无效时。我假设您使用的任何 ruby​​ 环境都会以某种方式改变它。在.bash_profile 的末尾添加以下行应该使它再次工作:

    export PATH=/opt/local/bin:$PATH
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-07-25
      • 1970-01-01
      • 2014-09-21
      • 1970-01-01
      • 1970-01-01
      • 2021-12-31
      • 1970-01-01
      相关资源
      最近更新 更多