【问题标题】:Why does Perlbrew launch bash on Mac OS X Lion?为什么 Perlbrew 在 Mac OS X Lion 上启动 bash?
【发布时间】:2012-06-26 23:40:17
【问题描述】:

当我跑步时...

perlbrew switch perl-5.16.0

...我明白了...

A sub-shell is launched with perl-5.16.0 as the activated perl. Run 'exit' to finish it.

...然后出现一个 bash 提示符。

这是预期的行为吗? 如果没有,我该如何解决?

【问题讨论】:

    标签: perl perlbrew


    【解决方案1】:

    当您安装不正确的perlbrew 时会发生这种情况。作为安装的一部分,系统会指示您向 shell 启动脚本添加一个命令,但似乎缺少该命令。

    将以下内容添加到您的 shell 启动脚本中:

    source .../perlbrew/etc/bashrc
    

    csh 有一个类似的脚本。

    source .../perlbrew/etc/cshrc
    

    【讨论】:

    • 谢谢,ikegami,效果很好。我将源代码行添加到~/.bash_profile。具体来说,如果有另一个像我这样的 Mac 新手:source /Users/Username/perl5/perlbrew/etc/bashrc
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-14
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多