Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Install Gaia failed #2973

Closed
yulidai opened this issue Dec 1, 2018 · 20 comments
Closed

Install Gaia failed #2973

yulidai opened this issue Dec 1, 2018 · 20 comments

Comments

@yulidai
Copy link

yulidai commented Dec 1, 2018

result of make get_tools && make get_vendor_deps && make install from readme instructions:

(1/57) Wrote github.com/cosmos/go-bip39@52158e4697b87de16ed390e1bdaf813e581008fa
(2/57) Wrote github.com/prometheus/common@master
(3/57) Wrote github.com/prometheus/procfs@master
(4/57) Wrote github.com/gorilla/context@v1.1.1
(5/57) Wrote github.com/davecgh/go-spew@v1.1.0
(6/57) Wrote github.com/btcsuite/btcutil@d4cc87b860166d00d6b5b9e0d3b3d71d6088d4d4
(7/57) Wrote github.com/bartekn/go-bip39@master
(8/57) Wrote github.com/beorn7/perks@master
(9/57) Wrote github.com/btcsuite/btcd@master
(10/57) Wrote gopkg.in/yaml.v2@v2.2.2
(11/57) Wrote github.com/ZondaX/hid-go@master
(12/57) Wrote github.com/mattn/go-isatty@v0.0.4
(13/57) Wrote github.com/magiconair/properties@v1.8.0
(14/57) Wrote github.com/mitchellh/mapstructure@v1.1.2
(15/57) Wrote github.com/fsnotify/fsnotify@v1.4.7
(16/57) Wrote github.com/bgentry/speakeasy@v0.1.0
(17/57) Wrote github.com/jmhodges/levigo@master
(18/57) Wrote github.com/rakyll/statik@v0.1.4
(19/57) Wrote github.com/golang/snappy@master
(20/57) Wrote github.com/gorilla/mux@v1.6.2
(21/57) Wrote github.com/gorilla/websocket@v1.4.0
(22/57) Wrote github.com/inconshreveable/mousetrap@v1.0
(23/57) Wrote github.com/go-stack/stack@v1.8.0
(24/57) Wrote github.com/hashicorp/hcl@v1.0.0
(25/57) Wrote github.com/go-logfmt/logfmt@v0.4.0
(26/57) Wrote github.com/matttproud/golang_protobuf_extensions@v1.0.1
(27/57) Wrote github.com/go-kit/kit@v0.6.0
(28/57) Wrote github.com/mitchellh/go-homedir@v1.0.0
(29/57) Wrote github.com/prometheus/client_golang@v0.9.1
(30/57) Wrote github.com/golang/protobuf@v1.1.0
(31/57) Wrote github.com/pelletier/go-toml@v1.2.0
(32/57) Wrote github.com/pkg/errors@v0.8.0
(33/57) Wrote github.com/pmezard/go-difflib@v1.0.0
(34/57) Wrote github.com/prometheus/client_model@master
(35/57) Wrote github.com/tendermint/iavl@v0.12.0
(36/57) Wrote github.com/zondax/ledger-goclient@v0.1.0
(37/57) Wrote github.com/tendermint/btcd@e5840949ff4fff0c56f9b6a541e22b63581ea9df
(38/57) Wrote github.com/tendermint/go-amino@v0.14.1
(39/57) Wrote golang.org/x/crypto (from https://github.com/tendermint/crypto)@3764759f34a542a3aef74d6b02e35be7ab893bba
(40/57) Wrote github.com/rs/cors@v1.6.0
(41/57) Wrote github.com/spf13/pflag@v1.0.3
(42/57) Wrote github.com/spf13/viper@v1.0.3
(43/57) Wrote github.com/gogo/protobuf@v1.1.1
(44/57) Wrote github.com/spf13/cast@v1.3.0
(45/57) Wrote github.com/spf13/afero@v1.1.2
(46/57) Wrote golang.org/x/sys@4e1fef5609515ec7a2cee7b5de30ba6d9b438cbf
(47/57) Wrote github.com/stretchr/testify@v1.2.1
(48/57) Wrote github.com/spf13/cobra@v0.0.3
(49/57) Wrote github.com/kr/logfmt@master
(50/57) Wrote github.com/tendermint/tendermint@v0.27.0-dev1
(51/57) Wrote golang.org/x/net@292b43bbf7cb8d35ddf40f8d5100ef3837cced3f
(52/57) Wrote github.com/spf13/jwalterweatherman@v1.0.0
(53/57) Wrote github.com/syndtr/goleveldb@c4c61651e9e37fa117f53c5a906d3b63090d8445
(54/57) Wrote github.com/rcrowley/go-metrics@e2704e165165ec55d062f5919b4b29494e9fa790
(55/57) Wrote golang.org/x/text@v0.3.0
(56/57) Wrote google.golang.org/genproto@383e8b2c3b9e36c4076b235b32537292176bae20
(57/57) Wrote google.golang.org/grpc@v1.16.0
leedy:cosmos-sdk leedy$ make install
make: statik: No such file or directory
make: *** [update_gaia_lite_docs] Error 1

$(GOPATH)/bin/statik and vendor/github.com/rakyll/statik are exists.
But vendor/github.com/rakyll/statik/statik.go is not exists, Is that the reason?

@yulidai
Copy link
Author

yulidai commented Dec 1, 2018

it's my fault, should reload bash_profile before each export runs
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
echo "export GOBIN=$GOPATH/bin" >> ~/.bash_profile
echo "export PATH=$PATH:$GOBIN" >> ~/.bash_profile

@yulidai yulidai closed this as completed Dec 1, 2018
@chtmorris
Copy link

chtmorris commented Mar 11, 2019

I am also having this issue, but I have reloaded the bash_profile. Still getting:

make: statik: No such file or directory
make: *** [update_gaia_lite_docs] Error 1

Any ideas?

@alexanderbez
Copy link
Contributor

@chtmorris try: make distclean update_tools vendor-deps install

@chtmorris
Copy link

Thanks @alexanderbez
Afraid I am getting the same error. Complete response is:

rm -f devtools-stamp vendor-deps snapcraft-local.yaml
rm -rf vendor/
--> Updating tools to correct version
/Library/Developer/CommandLineTools/usr/bin/make --always-make tools
cat: vendor-deps: No such file or directory
mkdir -p /Users/cm/go/src/github.com/golang && (test ! -d /Users/cm/go/src/github.com/golang/dep && cd /Users/cm/go/src/github.com/golang && git clone https://github.com/golang/dep) || true && cd /Users/cm/go/src/github.com/golang/dep && git fetch origin && git checkout -q 22125cfaa6ddc71e145b1535d4b7ee9744fefff2
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (5/5), done.
remote: Total 5 (delta 1), reused 2 (delta 0), pack-reused 0
Unpacking objects: 100% (5/5), done.
From https://github.com/golang/dep

  • 6805aa9b...9f5a08a8 installation -> origin/installation (forced update)
    9227ca64..faa61893 master -> origin/master
  • e62a41fb...faa61893 release-0.5.1 -> origin/release-0.5.1 (forced update)
  • [new tag] v0.5.1 -> v0.5.1
    cd /Users/cm/go/src/github.com/golang/dep/cmd/dep && /usr/local/bin/go install
    mkdir -p /Users/cm/go/src/github.com/alecthomas && (test ! -d /Users/cm/go/src/github.com/alecthomas/gometalinter && cd /Users/cm/go/src/github.com/alecthomas && git clone https://github.com/alecthomas/gometalinter) || true && cd /Users/cm/go/src/github.com/alecthomas/gometalinter && git fetch origin && git checkout -q v3.0.0 && cd /Users/cm/go/src/github.com/alecthomas/gometalinter && /usr/local/bin/go install
    mkdir -p /Users/cm/go/src/github.com/rakyll && (test ! -d /Users/cm/go/src/github.com/rakyll/statik && cd /Users/cm/go/src/github.com/rakyll && git clone https://github.com/rakyll/statik) || true && cd /Users/cm/go/src/github.com/rakyll/statik && git fetch origin && git checkout -q v0.1.5 && cd /Users/cm/go/src/github.com/rakyll/statik && /usr/local/bin/go install
    go get golang.org/x/tools/cmd/goimports
    --> Generating vendor directory via dep ensure
    (1/58) Wrote github.com/otiai10/copy@7e9a647135a142c2669943d4a4d29be015ce9392
    (2/58) Wrote github.com/stretchr/testify@v1.2.1
    (3/58) Wrote github.com/bartekn/go-bip39@master
    (4/58) Wrote github.com/zondax/ledger-go@v0.8.0
    (5/58) Wrote github.com/beorn7/perks@master
    (6/58) Wrote github.com/rcrowley/go-metrics@e2704e165165ec55d062f5919b4b29494e9fa790
    (7/58) Wrote github.com/prometheus/common@v0.2.0
    (8/58) Wrote github.com/tendermint/go-amino@v0.14.1
    (9/58) Wrote github.com/fsnotify/fsnotify@v1.4.7
    (10/58) Wrote github.com/rakyll/statik@v0.1.4
    (11/58) Wrote github.com/syndtr/goleveldb@c4c61651e9e37fa117f53c5a906d3b63090d8445
    (12/58) Wrote github.com/jmhodges/levigo@v1.0.0
    (13/58) Wrote golang.org/x/net@292b43bbf7cb8d35ddf40f8d5100ef3837cced3f
    (14/58) Wrote github.com/pmezard/go-difflib@v1.0.0
    (15/58) Wrote gopkg.in/yaml.v2@v2.2.2
    (16/58) Wrote golang.org/x/crypto (from https://github.com/tendermint/crypto)@3764759f34a542a3aef74d6b02e35be7ab893bba
    (17/58) Wrote github.com/bgentry/speakeasy@v0.1.0
    (18/58) Wrote github.com/prometheus/procfs@master
    (19/58) Wrote github.com/go-kit/kit@v0.6.0
    (20/58) Wrote github.com/rs/cors@v1.6.0
    (21/58) Wrote github.com/tendermint/btcd@v0.1.1
    (22/58) Wrote github.com/tendermint/iavl@v0.12.1
    (23/58) Wrote golang.org/x/sys@4e1fef5609515ec7a2cee7b5de30ba6d9b438cbf
    (24/58) Wrote golang.org/x/text@v0.3.0
    (25/58) Wrote github.com/spf13/afero@v1.2.1
    (26/58) Wrote google.golang.org/genproto@383e8b2c3b9e36c4076b235b32537292176bae20
    (27/58) Wrote github.com/go-logfmt/logfmt@v0.4.0
    (28/58) Wrote github.com/spf13/cast@v1.3.0
    (29/58) Wrote github.com/spf13/cobra@v0.0.3
    (30/58) Wrote github.com/zondax/hid@v0.9.0
    (31/58) Wrote github.com/go-stack/stack@v1.8.0
    (32/58) Wrote google.golang.org/grpc@v1.19.0
    (33/58) Wrote github.com/tendermint/tendermint@v0.31.0-dev0
    (34/58) Wrote github.com/pelletier/go-toml@v1.2.0
    (35/58) Wrote github.com/mattn/go-isatty@v0.0.6
    (36/58) Wrote github.com/btcsuite/btcd@ed77733ec07dfc8a513741138419b8d9d3de9d2d
    (37/58) Wrote github.com/spf13/jwalterweatherman@v1.1.0
    (38/58) Wrote github.com/matttproud/golang_protobuf_extensions@v1.0.1
    (39/58) Wrote github.com/kr/logfmt@master
    (40/58) Wrote github.com/btcsuite/btcutil@d4cc87b860166d00d6b5b9e0d3b3d71d6088d4d4
    (41/58) Wrote github.com/spf13/pflag@v1.0.3
    (42/58) Wrote github.com/golang/protobuf@v1.1.0
    (43/58) Wrote github.com/magiconair/properties@v1.8.0
    (44/58) Wrote github.com/golang/snappy@v0.0.1
    (45/58) Wrote github.com/cosmos/go-bip39@52158e4697b87de16ed390e1bdaf813e581008fa
    (46/58) Wrote github.com/pkg/errors@v0.8.0
    (47/58) Wrote github.com/gogo/protobuf@v1.1.1
    (48/58) Wrote github.com/spf13/viper@v1.0.3
    (49/58) Wrote github.com/mitchellh/mapstructure@v1.1.2
    (50/58) Wrote github.com/gorilla/mux@v1.7.0
    (51/58) Wrote github.com/prometheus/client_golang@v0.9.2
    (52/58) Wrote github.com/prometheus/client_model@master
    (53/58) Wrote github.com/cosmos/ledger-cosmos-go@v0.9.8
    (54/58) Wrote github.com/davecgh/go-spew@v1.1.0
    (55/58) Wrote github.com/hashicorp/hcl@v1.0.0
    (56/58) Wrote github.com/gorilla/websocket@v1.4.0
    (57/58) Wrote github.com/inconshreveable/mousetrap@v1.0
    (58/58) Wrote github.com/ethereum/go-ethereum@v1.8.23
    tar -c vendor/ | sha1sum | cut -d' ' -f1 > vendor-deps
    /bin/sh: sha1sum: command not found
    make: statik: No such file or directory
    make: *** [update_gaia_lite_docs] Error 1

@alexanderbez
Copy link
Contributor

Yes, you've now run into #3630. For now, you'll have to install sha1sum manually. Also, wrt to statik, can you try tools instead of update_tools?

@chtmorris
Copy link

Hmmm. I installed sha1sum manually and ran:
make distclean tools vendor-deps install

Now getting:

tar -c vendor/ | sha1sum | cut -d' ' -f1 > vendor-deps
make: statik: No such file or directory
make: *** [update_gaia_lite_docs] Error 1

@alexanderbez
Copy link
Contributor

I'm not too sure why tools isn't installing it? Assuming your Go env is setup correctly, you can just install statik directly (v0.1.5).

@chtmorris
Copy link

I installed statik directly and am now getting a tonne of other packages that can't load. My assumption is that I must have setup my Go env incorrectly.

How can I determine if this is the case? My .bash_profile looks like this:

export GOPATH=/Users/cm/go
export GOBIN=/bin
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin:

@alexanderbez
Copy link
Contributor

Your env should be something like follows:

export GOPATH=...
export GOROOT=...
export PATH=$PATH:$GOPATH/bin
export PATH=$PATH:$GOROOT/bin

@chtmorris
Copy link

I can't figure out what is wrong with my env. go env gives me:

GOARCH="amd64"
GOBIN="/Users/cm/go/bin"
GOCACHE="/Users/cm/Library/Caches/go-build"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/cm/go"
GOPROXY=""
GORACE=""
GOROOT="/usr/local/go"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/pr/mqj24w3s7_qbbkbs2skjp9z00000gn/T/go-build919030757=/tmp/go-build -gno-record-gcc-switches -fno-common"

I'm getting errors like:

can't load package: package ledger: cannot find package "ledger" in any of:
/usr/local/go/src/ledger (from $GOROOT)
/Users/cm/go/src/ledger (from $GOPATH)

@alexanderbez
Copy link
Contributor

You're $PATH is not correct. Your $PATH should be: PATH=$PATH:$GOPATH/bin

@chtmorris
Copy link

I'm still not getting this right. My .bash_profile now looks like this:
export GOPATH=/Users/cm/go
export GOBIN=/Users/cm/go/bin
export PATH=$PATH:$GOPATH/bin

What should I be doing to update $PATH?

@alexanderbez
Copy link
Contributor

Your $PATH is updated -- it looks correct.

@chtmorris
Copy link

Hmm. Well these are the errors I'm now getting:

can't load package: package ledger: cannot find package "ledger" in any of:
/usr/local/go/src/ledger (from $GOROOT)
/Users/cm/go/src/ledger (from $GOPATH)
can't load package: package -ldflags: cannot find package "-ldflags" in any of:
/usr/local/go/src/-ldflags (from $GOROOT)
/Users/cm/go/src/-ldflags (from $GOPATH)
can't load package: package -X: cannot find package "-X" in any of:
/usr/local/go/src/-X (from $GOROOT)
/Users/cm/go/src/-X (from $GOPATH)

Any ideas?!

@chtmorris
Copy link

I'm still stuck here. I just deleted everything and went at it from scratch. I'm getting the same issue of can't load package for multiple packages (as above).

@alexanderbez
Copy link
Contributor

Still sounds like your Golang environment is still a bit messed up. Are you able to run other Golang applications?

@natemiller1
Copy link

Hey, double check the permissions on cosmos-sdk and if necessary sudo chown $usr cosmos-sdk -R

@chtmorris
Copy link

Thanks @natemiller1 - I tried that, but it didn't work.

I've actually ended up downloading an executable version of the cli that ChorusOne created. So I have it working through that.

@pitersky
Copy link

Was following the thread as I got same error when installing gaia. I think that I has found the source of the problem: sh commands listed on https://cosmos.network/docs/cosmos-hub/installation.html#install-gaia is incorrect and following them will result with incorrect ~/.bash_profile exports. This is due env variables may not be present on the user environment

One can use that instructions instead:

mkdir -p $HOME/go/bin
echo "export GOPATH=\$HOME/go" >> ~/.bash_profile
echo "export GOBIN=\$GOPATH/bin" >> ~/.bash_profile
echo "export PATH=\$PATH:\$GOBIN" >> ~/.bash_profile
source ~/.bash_profile

Notice that $ is escaped.

chengwenxi pushed a commit to irisnet/irishub that referenced this issue Sep 28, 2020
* Update install.md to include additional source calls

Fixes issue that comes from copy/paste the code block as-is.

cosmos/cosmos-sdk#2973 (comment)

* Update install.md ENV variable script [zh]
@yvesmessy
Copy link

These instructions worked for me as well on Mac OS:

mkdir -p $HOME/go/bin
echo "export GOPATH=$HOME/go" >> ~/.bash_profile
echo "export GOBIN=$GOPATH/bin" >> ~/.bash_profile
echo "export PATH=$PATH:$GOBIN" >> ~/.bash_profile
source ~/.bash_profile

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants