Go 언어

본문 바로가기
사이트 내 전체검색


Go 언어
Go 언어

6. Ubuntu 에서 Go 언어 설치

페이지 정보

작성자 관리자 댓글 0건 조회 3,324회 작성일 19-03-20 19:52

본문

6. Ubuntu 에서 Go 언어 설치

Install Prerequisites


root@leelab:~# apt install wget git



Install Go using Golang installer


root@leelab:~# wget -q https://storage.googleapis.com/golang/getgo/installer_linux

Make the Golang installation executable: 


root@leelab:~# chmod +x installer_linux

Lastly, run the installer_linux executable to install Go on your Ubuntu system. The installer will download and install the latest version Go:


root@leelab:~# ./installer_linux
Welcome to the Go installer!
Downloading Go version go1.12.1 to /root/.go
This may take a bit of time...
Downloaded!
Setting up GOPATH
GOPATH has been set up!

One more thing! Run `source /root/.bash_profile` to persist the
new environment variables to your current session, or open a
new shell prompt.

As prompted by installer, run the source command to update your current shell session variables to include the new GOPATH, or simply open a new shell session: 


root@leelab:~# source ~/.bash_profile

Check for go version: 



root@leelab:~# go version
go version go1.12.1 linux/amd64
root@leelab:~#

Lastly, as a test, try to get and execute Golang's hello world example: 


root@leelab:~# go get github.com/golang/example/hello
root@leelab:~# hello
Hello, Go examples



댓글목록

등록된 댓글이 없습니다.


개인정보취급방침 서비스이용약관 모바일 버전으로 보기 상단으로

TEL. 063-469-4551 FAX. 063-469-4560 전북 군산시 대학로 558
군산대학교 컴퓨터정보공학과

Copyright © www.leelab.co.kr. All rights reserved.