Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

解决:CentOS 6 下go module无法安装依赖 #5

deloz opened this Issue Feb 28, 2019 · 0 comments


None yet
1 participant
Copy link

deloz commented Feb 28, 2019

go mod tidy -v 死活安装不上依赖。出现GitHub的代码URL错误,拉取404。

经过一番研究,原来是CentOS6下 git的版本是1.7.1导致的。因为go get就是包装了git


yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
yum remove git
wget -c
tar xzf git-2.21.0.tar.gz
cd git-2.21.0
make prefix=/usr/local/git all
make prefix=/usr/local/git install
echo "export PATH=$PATH:/usr/local/git/bin" >> /etc/bashrc
source /etc/bashrc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.