From b79be26e05c949b29cafaf5e04f2f0d13b0d2686 Mon Sep 17 00:00:00 2001 From: smeb y <48400087+a3165458@users.noreply.github.com> Date: Tue, 12 Mar 2024 17:53:52 +0800 Subject: [PATCH] Update Artela.sh --- Artela.sh | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/Artela.sh b/Artela.sh index f06cb9b..b0fea9e 100644 --- a/Artela.sh +++ b/Artela.sh @@ -52,12 +52,17 @@ sudo apt update && sudo apt upgrade -y sudo apt install -y curl iptables build-essential git wget jq make gcc nano tmux htop nvme-cli pkg-config libssl-dev libleveldb-dev tar clang bsdmainutils ncdu unzip libleveldb-dev # 安装Go -ver="1.20.3" -wget "https://golang.org/dl/go$ver.linux-amd64.tar.gz" +rm -rf $HOME/go sudo rm -rf /usr/local/go -sudo tar -C /usr/local -xzf "go$ver.linux-amd64.tar.gz" -echo "export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin" >> $HOME/.bash_profile -source $HOME/.bash_profile +cd $HOME +curl https://dl.google.com/go/go1.20.3.linux-amd64.tar.gz | sudo tar -C/usr/local -zxvf - +cat <<'EOF' >>$HOME/.profile +export GOROOT=/usr/local/go +export GOPATH=$HOME/go +export GO111MODULE=on +export PATH=$PATH:/usr/local/go/bin:$HOME/go/bin +EOF +source $HOME/.profile go version # 安装所有二进制文件