tobert / pcstat

Page Cache stat: get page cache stats for files on Linux
Apache License 2.0
1.22k stars 152 forks source link

problems while installing #18

Open rocky-peng opened 7 years ago

rocky-peng commented 7 years ago

go build warning: GOPATH set to GOROOT (/usr/lib/golang) has no effect mincore.go:24:2: cannot find package "golang.org/x/sys/unix" in any of: /usr/lib/golang/src/golang.org/x/sys/unix (from $GOROOT) ($GOPATH not set)

already install go,but the file '/usr/lib/golang/src/golang.org/x/sys/unix' does not exist. i found a file : /usr/lib/golang/src/internal/syscall/unix

tightly-clutched commented 6 years ago

New-to-Go checklist...

$ sudo add-apt-repository ppa:gophers/archive $ sudo apt update $ sudo apt-get install golang-1.9-go $ export PATH=$PATH:/usr/lib/go-1.9/bin $ go get golang.org/x/sys/unix $ go get github.com/tobert/pcstat/pcstat $ export GOPATH=$HOME/go $ cd ~/go/src/github.com/tobert/pcstat/ $ go build

find your new binary at ~/go/bin/pcstat

Davidrjx commented 3 years ago

go1.14 does not install it

kokes commented 3 years ago

@Davidrjx can you provide more info?

This works just fine:

$ docker run --rm -it golang:1.14
$ go get github.com/tobert/pcstat/pcstat
$ ./bin/pcstat
techie2000 commented 2 years ago

@tightly-clutched Not sure if it's me (it's the first time I've installed/played with go, so it quite probably is me) but I found that instead of

go get github.com/tobert/pcstat/pcstat

I had to use

go get github.com/tobert/pcstat