一些莫名奇妙的问题

git

在使用 git clone gogs 项目的时候出现错误 fatal: unable to fork ,原因是因为没有 openssh,解决:brew install openssh

npm

问题如下:

1
2
3
4
5
6
> node-gyp rebuild
No receipt for 'com.apple.pkg.CLTools_Executables' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLILeo' found at '/'.
No receipt for 'com.apple.pkg.DeveloperToolsCLI' found at '/'.
gyp: No Xcode or CLT version detected!

尝试解决:

1
2
xcode-select --install
xcode-select: error: command line tools are already installed, use "Software Update" to install updates

尝试失败了,再次尝试解决:

1
2
sudo rm -rf $(xcode-select -print-path)
xcode-select --install

先删除再重新安装问题解决,真是奇葩问题