banner
DarianBlog

DarianBlog

达里安博客-专注于技术分享与交流的博客。博客致力于创造一个简单而直接的技术学习平台。
email

Upgrade go version in Ubuntu

1. If there is an old version of go in the system, skip this step (check go version: go version)#

1. sudo rm -rf /usr/local/go
2. sudo apt-get remove golang
3. sudo apt-get remove golang-go
4. sudo apt-get autoremove

2. Install necessary components#

apt install wget

3. Get go installation package#

wget https://go.dev/dl/go1.20.4.linux-amd64.tar.gz

4. Unzip go#

tar -C /usr/local -xzf go1.20.4.linux-amd64.tar.gz

5. Set environment variables#

export PATH=$PATH:/usr/local/go/bin

6. Execute go version again to check the version#

Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.