安装Xcode 4.3后无法获得MacPort功能 [英] Unable to get MacPort functionality after installing Xcode 4.3

查看:86
本文介绍了安装Xcode 4.3后无法获得MacPort功能的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我无法使MacPorts正常运行.我刚刚安装了OSX Lion 10.7.3,首先下载并安装了MacPorts,然后在阅读了要求之后,从App Store下载了Xcode4.3,然后进行了安装.我启动了Xcode,它看起来可以运行并且可以正常工作.但是,当我尝试使用MacPorts进行移植时,它给了我这个错误消息(摘录):

I am having trouble getting MacPorts to function properly. I just installed OSX Lion 10.7.3 I downloaded and installed MacPorts first, and then after reading the requirements, I downloaded Xcode4.3 from the App Store, and then installed it. I launched Xcode and it looks to be operational and functional. However when I attempted to port with MacPorts, it gave me this error message(excerpt):

Warning: xcodebuild exists but failed to execute
Warning: Xcode does not appear to be installed; most ports will likely fail to build.

我遵循了以下建议:

如何在OSX Lion上为Xcode安装其他软件包以允许MacPorts工作

,并从Xcode中的首选项"中安装了command_line_tools_for_xcode.我关闭了Xcode,然后再次出现错误:

and installed command_line_tools_for_xcode from the Preferences within Xcode. I closed Xcode, and again got the errors:

$ sudo port install libsocketsPassword:
Warning: xcodebuild exists but failed to execute
Warning: Xcode does not appear to be installed; most ports will likely fail to build.
--->  Computing dependencies for libsockets
--->  Dependencies to be installed: openssl zlib
--->  Extracting zlib
Error: Couldn't determine your Xcode version (from '/usr/bin/xcodebuild -version').
Error: 
Error: If you have not installed Xcode, install it now; see:
Error: http://guide.macports.org/chunked/installing.xcode.html
Error: 
Error: Target org.macports.extract returned: unable to find Xcode
Error: Failed to install zlib
Log for zlib is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_archivers_zlib/zlib/main.log
Error: The following dependencies were not installed: openssl zlib
Error: Status 1 encountered during processing.

我不确定下一步该怎么做.我该如何排除Xcode和MacPort界面的麻烦?

I am uncertain where to go next with this. How do i trouble shoot my Xcode and MacPort interface?

推荐答案

理论上,如果您安装了Xcode4.3(在/Applications中),这应该可以工作:

In theory this should work if you have Xcode4.3 installed (in /Applications):

$ sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer/

(并且您已经安装了可选的命令行工具)

(And you've installed the optional command line tools)

这篇关于安装Xcode 4.3后无法获得MacPort功能的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆