【问题标题】:Port: command not found, even though /.bash_profile is 'correct'端口:找不到命令,即使 /.bash_profile 是“正确的”
【发布时间】:2013-09-18 20:03:37
【问题描述】:

我最近安装了 Macports,最终在我的 MAMP 上安装了 INTL 扩展。我目前正在尝试更新 Macports -

sudo port -v selfupdate

返回错误 -

sudo:端口:找不到命令

我读到它可能是 .bash_profile 中的路径。这些是我的路径:

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

export MANPATH=$MANPATH:/opt/local/share/man

export INFOPATH=$INFOPATH:/opt/local/share/info

从这里开始,我不确定如何进一步诊断。如果您需要任何其他文件,请告诉我。

【问题讨论】:

    标签: macports .bash-profile


    【解决方案1】:

    如果您尚未启动新的 shell 或 sourced 或您的 .bash_profile,则对 PATH 的更改不会出现在当前 shell 使用的 PATH 的值中。

    【讨论】:

    • 我已经找到了我的 .bash_profile 但它仍然没有为我的 Composer 选择路径?
    【解决方案2】:

    您不使用 .bash_profile 文件。使用从 macport 创建的 .profile 文件。这将起作用。

    干杯,

    马可

    【讨论】:

      猜你喜欢
      • 2014-10-08
      • 2016-07-14
      • 2012-03-30
      • 2020-10-10
      • 2022-01-10
      • 2020-08-25
      相关资源
      最近更新 更多