xcode-select命令不起作用

时间:2014-11-10 14:51:09

标签: xcode macos macports xcode5.1.1

我正在尝试通过macports安装软件。例如,在发出命令时

sudo port install KeePassX

我收到以下错误消息:

Error:
Error: No valid Xcode installation is properly selected.
Error: Please use xcode-select to select an Xcode installation:
Error:     sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer # version 5.1.1
Error:
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 KeePassX
--->  Dependencies to be installed: qt4-mac dbus jpeg libmng lcms tiff libpng
--->  Activating dbus @1.8.8_0
Error: org.macports.activate for port dbus returned: Image error: /Library/LaunchAgents/org.freedesktop.dbus-session.plist already exists and does not belong to a registered port.  Unable to activate port dbus. Use 'port -f activate dbus' to force the activation.
Error: Failed to install dbus
Please see the log file for port dbus for details:
    /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_tarballs_ports_devel_dbus/dbus/main.log
Error: The following dependencies were not installed: qt4-mac dbus jpeg libmng lcms tiff libpng
To report a bug, follow the instructions in the guide:
    http://guide.macports.org/#project.tickets
Error: Processing of port KeePassX failed

运行时

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

我得到了输出

/usr/bin/xcode-select: line 2: exec: -s: invalid option
exec: usage: exec [-cl] [-a name] file [redirection ...]

xcode-select命令位于/ usr / bin

$ which xcode-select
/usr/bin/xcode-select

$ ls -alh /usr/bin/xcode-select
lrwxr-xr-x  1 root  wheel     5B 16 Nov  2012 /usr/bin/xcode-select -> xcrun

并包含

$ cat /usr/bin/xcode-select
#!/bin/sh
exec "$@"

当我尝试在Xcode.app中更改命令行设置中的版本时,有一个选项XCODE 5.1.1,但是当我选择它时它会变回灰色。什么可能是问题的想法?

0 个答案:

没有答案