> sudo fsck /dev/sda1

fsck from util-linux 2.20.1

e2fsck 1.42.9 (4-Feb-2014)

/dev/sda1 is mounted.

e2fsck: Cannot continue, aborting.


I could run fsck with this options.


fsck -nf /dev/sda1


'Linux' 카테고리의 다른 글

Install apache webserver on ubuntu 16.4  (0) 2017.02.26
How to capture screen on Ubuntu  (0) 2017.02.02
exports  (0) 2014.06.24
mount shared forlder  (0) 2012.02.03
gvim probleam  (1) 2012.02.03


Reference : https://golang.org/


What is Go language?


Go is an open source programming language that makes it easy to build simple, reliable, and efficient software.


How to set up host environment?

You can download installation binary file or you can building from source

https://golang.org/dl/


Download Go distribution

https://golang.org/doc/install


Installing Go from source

https://golang.org/doc/install/source


I will install from source on Ubuntu 16.04 amd64(x86-64)

Download source

git clone https://go.googlesource.com/go

cd go

git checkout go1.8    or git checkout master  ( I will use stable version go1.8 branch)


Try to install

I have got an error like this.

 ./all.bash 

##### Building Go bootstrap tool.

cmd/dist

ERROR: Cannot find /home/jinseo/go1.4/bin/go.

Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.

 


Resolve the issue


$ GOOS=linux GOARCH=amd64 ./bootstrap.bash 

#### Copying to ../../go-linux-amd64-bootstrap

#### Cleaning ../../go-linux-amd64-bootstrap

#### Building ../../go-linux-amd64-bootstrap

##### Building Go bootstrap tool.
cmd/dist
ERROR: Cannot find /usr/bin/go.
Set $GOROOT_BOOTSTRAP to a working Go tree >= Go 1.4.

I have to install go cross compiler
$ sudo apt-get install gccgo-5
$ sudo update-alternatives --set go /usr/bin/go-5
update-alternatives: error: no alternatives for go
--> I made a soft link

You can skip this part to run bootstrap.bash

After made a soft link I ran again

 $ GOOS=linux GOARCH=amd64 ./bootstrap.bash 
../../go-linux-amd64-bootstrap already exists; remove before continuing

I deleted the directory
$ rm -rf ../../go-linux-amd64-bootstrap/

Ran again
$ GOOS=linux GOARCH=amd64 ./bootstrap.bash 


......

Bootstrap toolchain for linux/amd64 installed in /home/jinseo/work/golang/go-linux-amd64-bootstrap.

Building tbz.

-rw-rw-r-- 1 jinseo jinseo 55474955 Mar  1 05:55 /home/jinseo/work/golang/go-linux-amd64-bootstrap.tbz


Build was finished successfully.



$ ./all.bash

......
Installed Go for linux/amd64 in /home/jinseo/work/golang/go
Installed commands in /home/jinseo/work/golang/go/bin
*** You need to add /home/jinseo/work/golang/go/bin to your PATH.

I removed the soft link (/usr/bin/go) and I added /home/jinseo/work/golang/go/bin to PATH.

Run test program

hello.go
package main

import "fmt"

func main() {
    fmt.Printf("hello, world\n")
}
jinseo@jinseo-desktop:~/work/golang/go/src$ vi hello.go
jinseo@jinseo-desktop:~/work/golang/go/src$ go run hello.go 
hello, world


Is there anything you'd like to add?

덧붙이고 싶은 말이 있어?


I can smell the cheicals

화확 물질 냄새가 나요.


I went to school, only to find it was Sunday.

학교를 갔는데, 보니까 일요일이더라고.

'English' 카테고리의 다른 글

Boy Twins Influence Girl Twins  (0) 2013.11.04
질병관련  (2) 2012.07.06
ac·cu·rate  (0) 2012.06.13
peripherals  (0) 2012.06.13
Obama Declares Swine Flu A 'National Emergency'  (1) 2009.10.26