顶部右侧自定义内容
顶部左侧自定义内容
当前位置:首页 > > 正文

debian9安装升级go

作者:xiaoyun发布时间:2021-01-09 12:04分类: 浏览:441评论:0


导读: 先更新系统 sed -i 's/jessie/stretch/g' /etc/apt/sources.list;...

先更新系统

sed -i 's/jessie/stretch/g' /etc/apt/sources.list;
apt upgrade -y;
apt update -y;

安装golang

apt-get install golang git -y

升级go

cd /root
mkdir -p work 
git clone https://github.com/golang/go.git
cd go/src 
./all.bash
mv /root/go /usr/local
echo 'export PATH=$PATH:/usr/local/go/bin:$GOPATH/bin' >>~/.bashrc
echo 'export GOPATH=$HOME/work' >>~/.bashrc
source ~/.profile
mv /usr/bin/go /usr/bin/goold
ln -s /usr/local/go/bin/go /usr/bin/go

查看go版本

go version

本文链接:https://www.xikunyun.com/news/content/1852.html


标签:


排行