System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
#!/bin/bash | |
# Upgrade Cosmos SDK and restart gaiad | |
POSITIONAL=() | |
while [[ $# -gt 0 ]] | |
do | |
key="$1" | |
case $key in | |
-t|--tag) |
#!/bin/bash | |
# Upgrade the system and install go | |
sudo apt update | |
sudo apt upgrade -y | |
sudo apt install gcc git make -y | |
sudo snap install --classic go | |
sudo mkdir -p /opt/go/bin | |
# Export environment variables |
System: Debian/Ubuntu/Fedora. Might work for others as well.
As mentioned here, to update a go version you will first need to uninstall the original version.
To uninstall, delete the /usr/local/go
directory by:
curl
to get the JSON response for the latest releasegrep
to find the line containing file URLcut
and tr
to extract the URLwget
to download itcurl -s https://api.github.com/repos/jgm/pandoc/releases/latest \
| grep "browser_download_url.*deb" \
| cut -d : -f 2,3 \
| tr -d \" \