우분투 go 설치 (apt)

Jmnote (토론 | 기여)님의 2018년 1월 22일 (월) 14:54 판 (→‎확인 2)
우분투 go 설치
apt-get install golang-go

1 확인

root@zetawiki:~# go version
The program 'go' is currently not installed.  You can install it by typing:
apt-get install golang-go

2 설치

root@zetawiki:~# apt-get install golang-go
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following extra packages will be installed:
  golang-src
The following NEW packages will be installed:
  golang-go golang-src
0 upgraded, 2 newly installed, 0 to remove and 71 not upgraded.
Need to get 20.1 MB of archives.
After this operation, 81.5 MB of additional disk space will be used.
Do you want to continue [Y/n]?
... (생략)
This choice can be modified by running "dpkg-reconfigure golang-go". 

Report installation of public packages to Go Dashboard?  

<Yes>                                             <No>
Enter[1]
... (생략)
Selecting previously unselected package golang-go.
Unpacking golang-go (from .../golang-go_2%3a1-5_amd64.deb) ...
Setting up golang-src (2:1-5) ...
Setting up golang-go (2:1-5) ...

3 확인 2

root@zetawiki:~# go version
go version go1.6.2 linux/amd64
root@zetawiki:~# apt show golang-go | grep Version
Version: 2:1.6-1ubuntu4

4 테스트

root@zetawiki:~# vi test.go
package main

import "fmt"

func main() {
    fmt.Println("Hello, World")
}
root@zetawiki:~# go run test.go
Hello, World

5 같이 보기

6 주석

  1. 기본값인 Yes 선택
문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}