2011-10-17 126 views
1

我試圖從HTML5 Boilerplate運行構建腳本,我必須爲此安裝YUM。我在Mac OS Snow Leopard 10.6.8。當我做了sudo port install yum,我收到以下錯誤。任何想法我怎麼能糾正它,並正確安裝yum?無法在MacOS中安裝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得到上述錯誤再次安裝它。

+0

你嘗試過'port -f activate py24-distribute'命令嗎? – bdares

+0

我做到了,它安裝了YUM。但之後,當我做'yum安裝ant-contrib'時,它給了我'Segmentation Fault' - 與我的第一個錯誤一樣。任何想法?謝謝! – Sayanee

回答

5

我想你已經在這裏得到了錯誤的結局。您需要在Mac上安裝YUM 不需要。事實上,這種行爲純粹是瘋狂的,因爲你已經有了一個非常好的MacPorts形狀的包管理器!

再念出來

如果你在Mac或Linux ...

你已經得到了所有你的依賴預安裝,有可能。你可能需要一個yum安裝ant-contrib或你有什麼。

關鍵點有「或你有什麼」。這是一種晦澀的說法,「或者你的包管理器的等價命令」。在基於Red Hat的系統上,軟件包管理器的確是YUM;在Debian系統上,它是APT;在Mac上,它是MacPorts。

所以,刪除你的YUM安裝,只需做:

port install ant-contrib 

您現在可以着手實際運行螞蟻。

+0

謝謝湯姆的澄清。通過macports安裝獲得Ant工作。 – Sayanee

+0

當我嘗試在10.6.8的終端中運行此命令時,我得到'port:command not found'。 – supertrue

+1

@supertrue:你有[已安裝MacPorts](http://www.macports.org/install.php)嗎? –