Carthage: xcode-select: error: tool 'xcodebuild' requires Xcode

Created on 1 Oct 2018  路  12Comments  路  Source: Carthage/Carthage

  • carthage install method: [ ] .pkg, [ X] homebrew, [ ] source

Error:
==> make prefix_install PREFIX=/usr/local/Cellar/carthage/0.30.1
Last 15 lines from /Users/dechrish/Library/Logs/Homebrew/carthage/01.make:
2018-10-01 09:43:30 -0700

make
prefix_install
PREFIX=/usr/local/Cellar/carthage/0.30.1

rm -f "CarthageApp.pkg"
git submodule update --init --recursive
rm -f "Carthage.pkg"
rm -f "CarthageKit.framework.zip"
ZDOTDIR='/var/empty' zsh -o NO_GLOBAL_RCS -c '[[ ! ${1:?} =~ "^[[:space:]]+\$" ]] && [[ ${1:A} != "/" ]] && [[ ${#} == "1" ]] && noglob rm -rf ${1:A}' -- "/tmp/Carthage.dst"
xcodebuild -workspace 'Carthage.xcworkspace' -scheme 'carthage' DSTROOT=/tmp/Carthage.dst clean
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
make: * [clean] Error 1
make: *
Waiting for unfinished jobs....

READ THIS: https://docs.brew.sh/Troubleshooting

These open issues may also help:
carthage 0.31.0 https://github.com/Homebrew/homebrew-core/pull/32544
carthage 0.31.0 https://github.com/Homebrew/homebrew-core/pull/32403

question

Most helpful comment

I used

%Xcode-select -r

which fixed the error in my case.

All 12 comments

Seems like you don't have any Xcode selected from xcode-select

@blender i have xcode installed.

Do you have it selected with xcode-select

how to check it?

@blender i have xcode-select;

^^>>> xcode-select 11:57:56
xcode-select: error: no command option given
Usage: xcode-select [options]

Print or change the path to the active developer directory. This directory
controls which tools are used for the Xcode command line tools (for example,
xcodebuild) as well as the BSD development commands (such as cc and make).

Options:
-h, --help print this help message and exit
-p, --print-path print the path of the active developer directory
-s , --switch set the path for the active developer directory
--install open a dialog for installation of the command line developer tools
-v, --version print the xcode-select version
-r, --reset reset to the default command line tools path

if you run xcode-select -p it should print the path to the currently selected Xcode. it seems that you don't have a currently selected Xcode.

To select one do:

sudo xcode-select -s /path/to/Xcode.app/Contents/Developer

^^>>> xcode-select -p 12:12:25
/Library/Developer/CommandLineTools

Yes you have CLI tools selected, which is what the first error reported.

You have to xcode-select Xcode instead, as I explained in my last comment

@blender Thanks
==> make prefix_install PREFIX=/usr/local/Cellar/carthage/0.30.1
Error: Failed changing dylib ID of /usr/local/Cellar/carthage/0.30.1/Frameworks/CarthageKit.framework/Versions/A/Frameworks/Tentacle.framework/Versions/A/Tentacle
from @rpath/Tentacle.framework/Versions/A/Tentacle
to /usr/local/opt/carthage/Frameworks/CarthageKit.framework/Versions/A/Frameworks/Tentacle.framework/Versions/A/Tentacle
Error: Failed to fix install linkage
The formula built, but you may encounter issues using it or linking other
formula against it.

==> Caveats
Bash completion has been installed to:
/usr/local/etc/bash_completion.d

zsh completions have been installed to:
/usr/local/share/zsh/site-functions

fish completions have been installed to:
/usr/local/share/fish/vendor_completions.d
==> Summary
馃嵑 /usr/local/Cellar/carthage/0.30.1: 69 files, 24.9MB, built in 1 minute 43 seconds

You are encountering the problems listed at

https://github.com/Homebrew/homebrew-core/pull/32544
https://github.com/Homebrew/homebrew-core/pull/32544

Please keep an eye on https://github.com/Carthage/Carthage/issues/2592

Your installation of carthage should be good to go anyways.

I am closing this issue now.

@blender thanks.

I used

%Xcode-select -r

which fixed the error in my case.

Was this page helpful?
0 / 5 - 0 ratings