0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

フューチャーAdvent Calendar 2023

Day 22

Ubuntuでaptを用いずGoインストール

Last updated at Posted at 2024-02-20

CircleCIのcimg-goや、公式のインストール手順を参考に作成。

Install:

## バージョン情報を記載
$ GO_VER="1.22.0"
$ ARCH="amd64"

## ダウンロード
$ curl -sSL "https://go.dev/dl/go${GO_VER}.linux-${ARCH}.tar.gz" | sudo tar -xz -C /usr/local/

## PATHを通す
$ echo 'export PATH=$PATH:/usr/local/go/bin' >> ~/.bashrc
$ echo 'export PATH="$(go env GOPATH)/bin:$PATH"' >>  ~/.bashrc

$ source ~/.bashrc

## 動作確認
$ go version
go version go1.22.0 linux/amd64

Uninstall:

$ rm -rf /usr/local/go
$ sed -i '/export PATH=$PATH:\/usr\/local\/go\/bin/d' ~/.bashrc

VS Code:

echo "check_certificate = off" >> ~/.wgetrc

上記で code .で起動。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?