LoginSignup
4
4

More than 5 years have passed since last update.

Go 1.2.2 -> 1.3 アップグレード私的作業メモ

Posted at

Go 1.2.2 が入っている環境に 1.3 をインストールしたときのメモ.

環境

1.2.2 の削除

http://golang.org/doc/install#install によると,

If you are upgrading from an older version of Go you must first remove the existing version.

とあるので,インストール済み 1.2.2 を削除します.削除方法は,http://golang.org/doc/install#uninstall によると,

To remove an existing Go installation from your system delete the go directory. This is usually /usr/local/go under Linux, Mac OS X, and FreeBSD or c:\Go under Windows.

とあるので /usr/local/go を消すだけで良いようです.

~ % ls /usr/local/go
AUTHORS     PATENTS     api     doc     lib     robots.txt
CONTRIBUTORS    README      bin     favicon.ico misc        src
LICENSE     VERSION     blog        include     pkg     test

~ % sudo mv /usr/local/go /usr/local/go-1.2.2
Password:

~ % ls /usr/local/go-1.2.2
AUTHORS     PATENTS     api     doc     lib     robots.txt
CONTRIBUTORS    README      bin     favicon.ico misc        src
LICENSE     VERSION     blog        include     pkg     test

パッケージのインストール

つぎに,公式パッケージをインストールします.

~/work $ curl -L -O http://golang.org/dl/go1.3.darwin-amd64-osx10.8.pkg
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100    91    0    91    0     0    301      0 --:--:-- --:--:-- --:--:--   304
100 49.0M  100 49.0M    0     0  2614k      0  0:00:19  0:00:19 --:--:-- 2714k

~/work $ openssl sha1 go1.3.darwin-amd64-osx10.8.pkg
SHA1(go1.3.darwin-amd64-osx10.8.pkg)= 4e8f2cafa23797211fd13f3fa4893ce3d5f084c4

~/work $ open go1.3.darwin-amd64-osx10.8.pkg

確認

Go が 1.3 になっていることを確認します.

~/work $ go version
go version go1.3 darwin/amd64

おわりに

Go 1.2.2 を 1.3 にアップグレードしました.パッケージをインストールするだけの簡単な作業でした.今回は公式サイトの指示に従って旧版を削除しましたが,この手順が本当に必要かどうかは自信がありません.

4
4
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
4
4