Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/21.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
升级到XCode 8后发生git CLI命令错误_Xcode_Git_Xcode8 - Fatal编程技术网

升级到XCode 8后发生git CLI命令错误

升级到XCode 8后发生git CLI命令错误,xcode,git,xcode8,Xcode,Git,Xcode8,今天早上我看到应用商店报告升级到XCode 8,不幸的是,上当了。现在,git CLI命令都无法工作。尝试在SO和Google上搜索,但没有发现任何有用的东西,尽管我在升级到XCode 8后发现了其他问题的最新帖子。任何git命令都会出现相同的错误-如下所示: %> git status dyld: Library not loaded: /usr/local/lib/libwep Referenced from: /Applications/Xcode.app/Contents/De

今天早上我看到应用商店报告升级到XCode 8,不幸的是,上当了。现在,git CLI命令都无法工作。尝试在SO和Google上搜索,但没有发现任何有用的东西,尽管我在升级到XCode 8后发现了其他问题的最新帖子。任何git命令都会出现相同的错误-如下所示:

%> git status
dyld: Library not loaded: /usr/local/lib/libwep
  Referenced from: /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild
  Reason: no suitable image found.  Did find:
        /usr/local/lib/libwep: mmap() error 1 at address=0x10F0E5000, size=0x0000F000 segment=__TEXT in Segment::map() mapping /usr/local/lib/libwep
        /usr/local/lib/libwep: mmap() error 1 at address=0x10F103000, size=0x0000F000 segment=__TEXT in Segment::map() mapping /usr/local/lib/libwep
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
正如它所说的,
/usr/local/lib/libwep
确实存在,但尝试加载时出错。此外,xcodebuild可执行文件也存在于消息中打印的路径,即
/Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

我还在
/usr/bin/xcodebuild
中看到另一个
xcodebuild
,但是
/
不被接受为有效的
开发者目录
值。一些可能更有用的信息:我已经安装了Github桌面。因此,我在Git repo中的一个源文件中进行了更改,Github桌面在其GUI中成功地显示了本地更改。但是,
git diff
git status
都不能从命令行工作


我还尝试过克隆一个新的本地repo,但是git clone也会抛出同样的错误。

看起来这与XCode无关。经过搜索,我发现了以下内容:

因此,WebSense使用libwep,这是一个默认安装在我工作的公司环境中所有计算机上的应用程序。它是为了安全和限制某些操作。例如,我也不能执行任何Heroku CLI命令,因为它

让我扫兴的是,即使使用WebSense,我在上周之前仍然能够运行git CLI命令,但上周晚些时候我还安装了新版本的WebSense客户端。因此,可能是新的WebSense版本现在也在阻止git CLI命令。我今天安装了XCode 8可能只是巧合,或者另一种可能是XCode 8升级与WebSense客户端升级相结合导致了这种情况


无论如何,谢天谢地,Github桌面似乎仍然可以工作,所以我只能使用它。

今天早上我尝试使用git时也遇到了同样的问题。我不得不进入并删除该程序,然后重新安装用于mac的git客户端。从那以后,它开始为我工作。

如果你不在Xcode上开发任何东西,只需从程序文件中删除Xcode,然后再次从CLI运行git。所需的工具将自动下载。没有问题