1

我正在尝试从HTML5 Boilerplate运行构建脚本,我必须为此安装 YUM。我在Mac OS Snow Leopard 10.6.8上。当我这样做时sudo port install yum,我收到以下错误。知道如何纠正它并正确安装 yum 吗?

--->  Computing dependencies for py24-nose
 --->  Dependencies to be installed: py24-distribute
 --->  Activating py24-distribute @0.6.24_0 Error: Target org.macports.activate returned: Image error:
 /opt/local/lib/python2.4/site-packages/setuptools-0.6c11-py2.4.egg-info
 already exists and does not belong to a registered port.  Unable to
 activate port py24-distribute. Use 'port -f activate py24-distribute'
 to force the activation. Error: Failed to install py24-distribute Log
 for py24-distribute is at:
 /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_python_py-distribute/py24-distribute/main.log
 Error: The following dependencies were not installed: py24-distribute
 Error: Unable to upgrade port: 1 Error: Unable to execute port:
 upgrade py24-nose failed To report a bug, see
 <http://guide.macports.org/#project.tickets>

之前安装 YUM 后,我得到了Segmentation Fault,所以我使用 Macports 卸载并再次安装它以获得上述错误。

4

1 回答 1

5

我认为你在这里搞错了。你不需要在 Mac 上安装 YUM。事实上,这种行为简直是疯了,因为你已经拥有了一个完美的 MacPorts 包管理器!

再读一遍它说的

如果你在 Mac 或 Linux 上...

您可能已经预先安装了所有依赖项。你可能需要一个 yum install ant-contrib 或者你有什么。

关键是“或者你有什么”。这是一种神秘的说法,即“或您的包管理器的等效命令”。在基于 Red Hat 的系统上,包管理器确实是 YUM;在 Debian 系统上,它是 APT;在 Mac 上,它是 MacPorts。

因此,删除您的 YUM 安装,然后简单地执行以下操作:

port install ant-contrib

您现在可以继续实际运行 Ant。

于 2011-10-17T07:49:26.523 回答