如何在 mac 上从源安装 Git 2.11
How to install Git 2.11 from Source on mac
我尝试从源代码安装最新版本的 git 但没有成功。我当前的版本是 2.10,我用
安装了它
sudo port install git
到目前为止我一直在尝试什么:
git clone https://github.com/git/git
进入我的文档文件夹。那么:
make prefix=/usr profile
make prefix=/usr PROFILE=BUILD install
这是我得到的错误:
ld: library not found for -lgcov
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [git-credential-store] Error 1
make: *** [profile] Error 2
但是我用的时候没有报错:
make
make install
但我认为这不仅仅是简单地 make
和 make install
首先卸载您的 Git 然后
使用homebrew安装最新版本Git
brew update
brew install git
重启终端
;) 恭喜您拥有最新的 Git 版本
我尝试从源代码安装最新版本的 git 但没有成功。我当前的版本是 2.10,我用
安装了它sudo port install git
到目前为止我一直在尝试什么:
git clone https://github.com/git/git
进入我的文档文件夹。那么:
make prefix=/usr profile
make prefix=/usr PROFILE=BUILD install
这是我得到的错误:
ld: library not found for -lgcov
clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[1]: *** [git-credential-store] Error 1
make: *** [profile] Error 2
但是我用的时候没有报错:
make
make install
但我认为这不仅仅是简单地 make
和 make install
首先卸载您的 Git 然后
使用homebrew安装最新版本Git
brew update
brew install git
重启终端
;) 恭喜您拥有最新的 Git 版本