web-dev-qa-db-ja.com

OS X Mavericksの新しいアップグレード後のgitエラー「xcodebuildが見つかりません」

以前に動作していたgitコマンドを実行しようとすると、次のようになります。

dyld: Symbol not found: _sqlite3_intarray_bind
  Referenced from: /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
  Expected in: /opt/local/lib/libsqlite3.dylib
 in /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData
git: error: unable to locate xcodebuild, please make sure the path to the Xcode folder is set correctly!
git: error: You can set the path to the Xcode folder using /usr/bin/xcode-select -switch

どうすれば修正できますか?

44
tol4trob

これは私にとってうまくいきますSudo xcode-select --switch /Library/Developer/CommandLineTools/

109
sushilprj

多くのグーグルと混乱の後、次の手順は解決策につながります(Xcodeがインストールされています)。一部はオプションである可能性があるため、私はこれらのエラーの専門家ではないので、これについて詳しく説明してください。

  • mavericksコマンドラインツールをダウンロード https://developer.Apple.com/downloads/
  • xcode-select --install
  • Sudo xcode-select -switch /Library/Developer/CommandLineTools
  • brew install sqlite3
  • コメントアウトしましたDYLD_LIBRARY_PATHエントリ.bashrcファイル
35
tol4trob

MacOS Mojaveではこれは私のために働いた(git 2.21.0):

xcode-select --install
Sudo xcode-select -switch /Library/Developer/CommandLineTools
17
theandrewlane

Xcodeを既にインストールしている場合は、次のコマンドを実行して、正しい場所を特定し、ポイントできます。

Sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer

または、AppStoreを使用して最新のXcodeをインストールします。

12
zdk
xcode-select --install
Sudo xcode-select -switch /Library/Developer/CommandLineTools

これでうまくいきました。

11
aregjan

ほとんどの場合、xcodeパスをそこにポイントするように切り替える前に、コマンドラインツールを再インストールする必要があります。

最初にツールをインストールします

$ xcode-select --install

これにより、ツールがフォルダー/Library/Developer/CommandLineToolsにインストールされます。

次に、このようにツールがインストールされた場所へのxcodeパスをポイントします

$ Sudo xcode-select -switch /Library/Developer/CommandLineTools

注:コマンド$ xcode-select -pを使用すると、現在のxcodeパスを確認できます。私がエラーを受け取ったとき、鉱山は最初に/Applications/Xcode.app/Contents/Developerを指していた

7
answerzilla

コマンド「git clone xxx」を実行すると、このエラーが発生しました

dyld:ライブラリが読み込まれていません:@ rpath/libswiftCore.dylib参照元:/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild理由:画像が見つかりませんgit:エラー:xcodebuildが見つかりません。パスを確認してくださいXcodeフォルダに正しく設定されています! git:エラー:/ usr/bin/xcode-select -switchを使用してXcodeフォルダーへのパスを設定できます

次に、コマンドを実行します

xcode-select -p

/Applications/Xcode.app/Contents/Developerを指す

コマンドSudo xcode-select -switch /Library/Developer/CommandLineToolsを実行した後

/Library/Developer/CommandLineToolsを指します

2
NANA

新しいHigh SierraインストールでFastlaneを実行しているこの同じ問題に遭遇しました。で解決:

Sudo xcode-select --switch /Applications/Xcode.app
2
wanton

これはMacOS High Sierra(10.13.6)で私のために働きました

Sudo xcode-select --switch/Library/Developer/CommandLineTools /

1
J Knowles

多分あなたはマーベリックスのためにXcode 5.0.1をインストールする必要があります。アップデートを確認します。

0
ton

これは私にとってはうまくいきました、ターミナルに貼り付けてください:Sudo xcode-select --switch/Library/Developer/CommandLineTools /

0
Kalena Galarnyk