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

Open
deloz opened this Issue Feb 28, 2019 · 0 comments

Comments

Projects
None yet
1 participant
@deloz
Copy link
Owner

deloz commented Feb 28, 2019

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

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

通过编译安装git后,解决问题。

yum install -y curl-devel expat-devel gettext-devel openssl-devel zlib-devel gcc perl-ExtUtils-MakeMaker
yum remove git
wget -c https://mirrors.edge.kernel.org/pub/software/scm/git/git-2.21.0.tar.gz
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.