Mac安装git,使用时提示 cannot run git xcode-select: note: no developer tools were found, requesting install.
2018-09-10 09:39:34
1. 苹果升级了系统到10.13,导致git不能使用,报以下错误
no developer tools were found at ‘/Applications/Xcode.app’, requesting install. Choose an option in the dialog to download the command line developer tools.
然后,会点击安装xcode,这个xcode内容有很多,将近5个g,实际上只需要装Command_Line_Tools_macOS_10.13_for_Xcode 就可以了,大小大概189MB, 去苹果的开发者官网就可以下载了,地址 https://developer.apple.com/download/more/
2. 在app store下载了最新的macOS High Sierra系统,安装时报错”将安装器信息下载到目标宗卷失败。“
解决这个也很简单,关闭wifi,再打开wifi就行了,没必要去苹果官网重新下载系统搞一遍。
xcode
-
select
:
note
: no
developer
tools
were found at '/Applications/
Xcode
.app',
reques
ting
install
. Choose an option in the dialog to download the command line
developer
tools
.
使用
brew报错:Error: No
developer
tools
install
ed.
Install
the Command Line
Tools
:
xcode
-
select
--
install
除了 brew update 之外,
使用
brew upgrade 和 brew
install
命令均报错。
遇到这个问题首先看
xcode
-tool是否打开过,如果没有打开过,先打开里面有一些需要得到你的agree。然后需要把python3的命令软连接过来。关于python设置相关的还有。
完整的错误信息
Сannot
Run
Git
xc
run
: error: invalid active
developer
path (/Library/
Developer
/CommandLine
Tools
), missing xc
run
at: /Library/
Developer
/CommandLine
Tools
/usr/bin/xc
run
看了下
Git
命令能否正常
使用
命令行
git
–help 依然报和上面同样的错误
在查找了下
git
的
安装
目录
whereis
git
/usr/bin/
假设您可以在没有sudo情况下
安装
ruby gems
curl https://raw.
git
hubusercontent.com/jethrodaniel/.
git
-hooks/master/
install
.sh | bash
您还应该将这些行添加到全局
git
ignore
.overcommit.yml
.
git
-hooks/
可能是~/.
git
ignore或~/.config/
git
/ignore ,具体取决于您的配置。
或者(最好)将其设为
git
别名,以便您可以将其绑定到任何回购协议:
git
config --global alias.hooks '!sh -c "curl https://raw.
git
hubusercontent.com/jethrodaniel/.
git
-hooks/master/
install
.s
这些主题中许多主题的原始未经修改的源可在。
要在
XCode
中
安装
主题,只需将.xccolortheme复制到
XCode
的主题文件夹( $HOME/Library/
Developer
/
Xcode
/UserData/FontAndColorThemes/可能需要创建)。
复制全部:
git
clone https://
git
hub.com/jasonm23/
xcode
-themes
cd
xcode
-themes
mkdir -p ~/Library/
Developer
/
Xcode
/UserData/FontAndColorThemes/
cp *.xccolortheme ~/Library/
Developer
/
Xcode
/UserData/FontAndColorThemes/
苹果升级了系统到10.13,导致
git
不能
使用
,报以下错误no
developer
tools
were found at '/Applications/
Xcode
.app',
reques
ting
install
. Choose an option in the dialog to download the command line
developer
tools
.然后,会点击
安装
xcode
,这...
xcode
-
select
:
note
: no
developer
tools
were found at '/Applications/
Xcode
.app',
reques
ting
install
. Choose an option in the dialog to download the command line
developer
tools
.
打开https://
developer
.apple.com/download/more/
下载Command Line
Tools
for
Xcode
.
1. 问题现象
$
git
version
xcode
-
select
:
note
: no
developer
tools
were found at '/Applications/
Xcode
.app',
reques
ting
install
. Choose an option in the dialog to download the command line
developer
tools
.
安装
homebrew
时
报错
具体错误:
no
developer
tools
were found at ‘/Applications/
Xcode
.app’,
reques
ting
install
.
Choose an option in the dialog to download the command line
developer
tools
.
报错原因:
mac
没有装
xcode
,
xcode
居然有11个G
解决方法:其实不需要下
xcode
,只需要下一个
xcode
的管理工具(个