38 cd /home
使用 wget
下載你選擇的版本,https://go.dev/dl/ 找到適用于Linux的版本,你可以選擇 .tar.gz
格式的文件以用于Debian系統
39 wget https://go.dev/dl/go1.22.4.linux-amd64.tar.gz
40 tar -C /usr/local -xzf go1.22.4.linux-amd64.tar.gz
42 echo ‘export PATH=$PATH:/usr/local/go/bin’ >> ~/.profile
44 vim ~/.bashrc
編輯~/.bashrc
,一般在root目錄,根據自己的情況修改,添加下面內容到.bashrc文件尾
export GO_HOME=/usr/local/go/
export GO_PATH= H O M E / g o e x p o r t