Skip to content

Can't figure out how to build termeter #7

@PenelopeFudd

Description

@PenelopeFudd

Hi;

I've never used go before, but termeter looks good enough that I'm making the effort.

Getting it running was hard; I had assumptions that were not true. Here's how to get termeter running, for beginners:

echo 'export GOPATH=$HOME/gocode' >> ~/.bashrc
echo 'export GOBIN=$HOME/bin' >> ~/.bashrc
source ~/.bashrc
go get github.com/atsaki/termeter/cmd/termeter
cd $GOPATH/src/github.com/atsaki/termeter/cmd/termeter/
go build
./termeter --help
go install
$GOBIN/termeter --help

Here are the things I figured out:

  1. Using 'cd /tmp; git clone https://github.com/atsaki/termeter.git; cd termeter; go build' won't work; the files have to be in the right directory.
  2. The $GOPATH and $GOBIN environment variables have to exist.
  3. The 'go build' command must be run in $GOPATH/src/github.com/atsaki/termeter/cmd/termeter/ , not $GOPATH/src/github.com/atsaki/termeter
  4. If you do 'go build' in that directory, termeter will be created in that directory. If you do 'go install', termeter will be moved to $GOBIN/termeter. However, if you do 'go install -a github.com/atsaki/termeter/cmd/termeter' from your home directory, you'll get 'go install runtime: open /usr/lib/golang/pkg/linux_amd64/runtime.a: permission denied'
  5. If you're in the same directory as the README.md file, 'go build' won't create 'termeter' and won't print any error messages; you have to be do 'cd ./cmd/termeter; go build'.

Ok, thanks for writing this!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions