Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/git/25.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
如何在mac上从源代码安装Git 2.11_Git_Github_Installation_Open Source - Fatal编程技术网

如何在mac上从源代码安装Git 2.11

如何在mac上从源代码安装Git 2.11,git,github,installation,open-source,Git,Github,Installation,Open Source,我试图从源代码安装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: erro

我试图从源代码安装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
makeinstall

然后先卸载Git

使用安装最新版本的Git

brew update
brew install git
重新启动终端


)()恭喜您拥有最新的Git版本

我可以用自制软件安装最新版本吗?因为我完全按照你今天下午的建议做了,但没有成功:(你能卸载旧的rails和ruby然后重新安装吗?@carrotcake yes也安装最新版本的自制软件。