Я нашел эту команду: xcode-select --install
. Но если я запущу его, я получу:
Usage: xcode-select -print-path
or: xcode-select -switch <xcode_folder_path>
or: xcode-select -version
Arguments:
-print-path Prints the path of the current Xcode folder
-switch <xcode_folder_path> Sets the path for the current Xcode folder
-version Prints xcode-select version information
Не процесс установки. XCode 5.1.1.
Если я открою настройки в XCode, все будет установлено.
Я попытался загрузить «Инструменты командной строки» с https://developer.apple.com/downloads/index.action#, пакет для Mountain Lion за апрель, март и октябрь, но когда я запускал каждый из них, я получал следующее сообщение об ошибке: Так что на данный момент я не знаю, что и как его установить.
Проблема в том, что когда я запускаю bundle update
в своем приложении Rails, я получаю сообщение об ошибке
You have to install development tools first.
Как поступить теперь?
EDIT: мне удалось установить инструменты командной строки из пакета, но когда я запускаю установку gem, ошибка все та же:
You have to install development tools first.
Я проверил, установлены ли инструменты командной строки следующим образом:
xcode-select -print-path
/Applications/Xcode.app/Contents/Developer
xcode-select -version
xcode-select version 2003.
sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer
Но это должно означать, что он установлен, верно? Но когда я пытаюсь установить гем, я все еще получаю сообщение об отсутствии Сначала необходимо установить инструменты разработки.
**EDIT2: Когда я запускаю brew doctor`, я получаю это (я думаю, может быть связь):
Warning: Setting DYLD_* vars can break dynamic linking.
Set variables:
DYLD_LIBRARY_PATH
Warning: You have an outdated version of /usr/bin/install_name_tool installed.
This will cause binary package installations to fail.
This can happen if you install osx-gcc-installer or RailsInstaller.
To restore it, you must reinstall OS X or restore the binary from
the OS packages.
Warning: "config" scripts exist outside your system or Homebrew directories.
`./configure` scripts often look for *-config scripts to determine if
software packages are installed, and what additional flags to use when
compiling and linking.
Having additional scripts in your path can confuse software installed via
Homebrew if the config script overrides a system or Homebrew provided
script of the same name. We found the following "config" scripts:
/opt/ImageMagick/bin/Magick++-config
/opt/ImageMagick/bin/Magick-config
/opt/ImageMagick/bin/MagickCore-config
/opt/ImageMagick/bin/MagickWand-config
/opt/ImageMagick/bin/Wand-config
Warning: Your XQuartz (2.7.4) is outdated
Please install XQuartz 2.7.6:
https://xquartz.macosforge.org
Warning: You seem to have osx-gcc-installer installed.
Homebrew doesn't support osx-gcc-installer. It causes many builds to fail and
is an unlicensed distribution of really old Xcode files.
Please run `xcode-select --install` to install the CLT.
Warning: Unbrewed dylibs were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected dylibs:
/usr/local/lib/libMagickCore-6.Q8.1.dylib
/usr/local/lib/libMagickWand-6.Q8.1.dylib
Warning: Unbrewed .la files were found in /usr/local/lib.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .la files:
/usr/local/lib/libMagickCore-6.Q8.la
/usr/local/lib/libMagickWand-6.Q8.la
Warning: Unbrewed .pc files were found in /usr/local/lib/pkgconfig.
If you didn't put them there on purpose they could cause problems when
building Homebrew formulae, and may need to be deleted.
Unexpected .pc files:
/usr/local/lib/pkgconfig/ImageMagick-6.Q8.pc
/usr/local/lib/pkgconfig/ImageMagick.pc
/usr/local/lib/pkgconfig/MagickCore-6.Q8.pc
/usr/local/lib/pkgconfig/MagickCore.pc
/usr/local/lib/pkgconfig/MagickWand-6.Q8.pc
/usr/local/lib/pkgconfig/MagickWand.pc
/usr/local/lib/pkgconfig/Wand-6.Q8.pc
/usr/local/lib/pkgconfig/Wand.pc
Warning: You have unlinked kegs in your Cellar
Leaving kegs unlinked can lead to build-trouble and cause brews that depend on
those kegs to fail to run properly once built. Run `brew link` on these:
libpng
xcode-select -v
показывает версию 2333. Думаю, вам нужно переустановить xcode. - person huocp   schedule 20.06.2014