Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
git错误“;无法找到xcodebuild";在新的OSX Mavericks升级之后_Git_Xcodebuild_Osx Mavericks - Fatal编程技术网

git错误“;无法找到xcodebuild";在新的OSX Mavericks升级之后

git错误“;无法找到xcodebuild";在新的OSX Mavericks升级之后,git,xcodebuild,osx-mavericks,Git,Xcodebuild,Osx Mavericks,当我尝试运行以前使用的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.fram

当我尝试运行以前使用的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

如何解决这个问题?

也许您应该为Mavericks安装Xcode 5.0.1。检查更新。

如果您已经安装了Xcode,您可以运行以下命令来确定并指向正确的位置

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

或者使用AppStore安装最新的Xcode。

经过大量的谷歌搜索和混乱之后,以下步骤将产生一个解决方案(安装了Xcode)。有些可能是可选的,所以请随意详细说明,因为我不是这些错误的专家

  • 下载mavericks命令行工具
  • xcode选择--安装
  • sudo xcode选择-开关/库/开发人员/命令行工具
  • brew安装sqlite3
  • 注释掉我的
    .bashrc
    文件中的
    DYLD\u库\u路径

这对我来说很有效
sudo xcode select--switch/Library/Developer/CommandLineTools/
我在全新的High Sierra安装上运行Fastlane时遇到了同样的问题。 解决方法:

sudo xcode-select --switch /Applications/Xcode.app

这对我有效,只需粘贴到终端: sudoxcode选择——开关/库/开发人员/命令行工具/

xcode-select --install
sudo xcode-select -switch /Library/Developer/CommandLineTools

这为我做到了。

在将xcode路径切换到该点之前,很可能需要重新安装命令行工具

首先安装工具

$xcode选择--安装

这将把工具安装到文件夹
/Library/Developer/CommandLineTools

然后将xcode路径指向安装工具的位置,如下所示

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


注意:您可以使用命令
$xcode select-p
查看当前的xcode路径。当我收到错误时,我最初指向
/Applications/Xcode.app/Contents/Developer
我在运行命令“git clone xxx”时遇到了这个错误

dyld:未加载库:@rpath/libswiftCore.dylib 引用自:/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild 原因:找不到图像 git:错误:找不到Xcode构建,请确保正确设置了Xcode文件夹的路径! git:error:您可以使用/usr/bin/Xcode select-switch设置Xcode文件夹的路径

然后,运行命令

xcode-select -p
指向
/Applications/Xcode.app/Contents/Developer

之后运行命令
sudo xcode选择-开关/库/开发人员/命令行工具


它指向MacOS Mojave上的
/Library/Developer/CommandLineTools

,这对我很有用(git 2.21.0):


这对我在MacOS High Sierra的工作很有效(10.13.6)


sudoxcode-select--switch/Library/Developer/CommandLineTools/

我的电脑上的配置也会出现问题,这些步骤都可以使用。你不需要下载mavericks命令行工具/成为一名开发人员。您可以从第2步开始。(至少假设您有新的xcode)在将OSX 10.9的命令行工具更新到6.0版之后,我在尝试安装redmine插件时遇到了OP的错误。关键是运行命令
sudoxcode select-switch/Library/Developer/CommandLineTools
,它修复了我的错误。谢谢就我个人而言,我只需要步骤1-3。谢谢你的信息!我只需要步骤3,我有xcode和另一个xcode测试版。卸载测试版后,我得到了“错误:执行时失败:/usr/bin/otool-L/usr/bin/install\u name\u tool”。然后我做了这个突击队,它又开始工作了。我做了
sudoxcode选择--switch/Applications/xcode.app
,但这并没有解决我的问题。为什么你的方法解决了这个问题?不知道你是怎么想出来的,但它对我也有效。你必须确保命令行工具已经安装,当我最终升级到sierra时,这些工具还没有安装-它对我不起作用。我得到
xcode选择:错误:无效的开发人员目录'/Library/developer/CommandLineTools/'
git
在我更新到Catalina后停止为我工作。在应用商店中更新Xcode对我来说很有效。不需要切换任何东西。
xcode-select --install
sudo xcode-select -switch /Library/Developer/CommandLineTools