繁体   English   中英

MacPorts安装-Shell命令/ Postflight脚本

[英]MacPorts Installation — Shell Commands/Postflight Script

我为OS X Leopard(10.5.8)运行了MacPorts安装程序(2.0.3),该安装程序“成功”完成。 不幸的是,port命令不可用,因此我查看了MacPorts指南,该指南说安装程序应该运行所谓的“ postflight”脚本来设置必要的环境变量。 我尝试手动运行postflight脚本(从此处下载),但是执行失败并显示以下输出:

    Detected the bash shell.
    Your shell already has the right PATH environment variable for use with
    MacPorts!
    Your shell already has the right MANPATH environment variable for use with
    MacPorts!
    Your shell already has the right DISPLAY environment variable for use with
    MacPorts!
    Adding [default] tag to sources.conf if needed...
    couldn't read file "/Contents/Resources/upgrade_sources_conf_default.tcl": no
   such file or directory
    Updating port image format...
    couldn't read file "/Contents/Resources/images_to_archives.tcl": no such file or
    directory
    Synchronizing the MacPorts installation with the project's rsync server...
    -bash: __PREFIX__/bin/port: No such file or directory
    An attempt to synchronize your recent MacPorts installation with the project's
    rsync server failed!
    Please run 'sudo port -d selfupdate' manually to find out the cause of the 
    error.
    You have succesfully installed the MacPorts system, launch a terminal and try it
    out!
    Read the port(1) manual page and http://guide.macports.org for help,
    http://www.macports.org/contact.php if you need to get in touch with The 
    MacPorts Project.

有任何想法吗?

首先直接调用port命令:

$ /opt/local/bin/port help

如果返回的是合理的内容(例如帮助文本),则说明当前的shell并未使用$PATH 尝试注销然后再次重新启动以在短期内解决该问题(这将测试您的.bashrc文件是否已正确配置),或者您可以直接修改PATH环境变量(不测试.bashrc ):

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

您下载了postflight脚本,但仅凭它无法访问Contents /中的附件脚本,因为它们位于安装包中。

那些丢失的Tcl脚本是用于从较早的安装进行升级的,日志显示PATH已经正确配置,但是macports bin目录在PATH变量中的位置可能错误,例如在PATH的末尾。

如果您要进行全新安装,则只需[PATH]和[MANPATH]-您希望macports在系统的手册页之前提供手册页-按照[1]

[1] http://guide.macports.org/#installing.shell.postflight

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM