lost and found ( for me ? )

Fedora 20 : install Go 1.2 lang

Reference

# cat /etc/fedora-release ;uname -ri
Fedora release 20 (Heisenbug)
3.13.0-1.vanilla.mainline.knurd.1.fc20.x86_64 x86_64

untar file and store these file under /usr/local/go directory
# tar -C /usr/local -xzf go1.2.linux-amd64.tar.gz

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



# export PATH=$PATH:/usr/local/go/bin

# which go
/usr/local/go/bin/go

# go version
go version go1.2 linux/amd64

make a go file
# cat hello.go
package main

import "fmt"

func main() {
   fmt.Print("hello\n")
}

run
# go run hello.go
hello

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.