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

bug: Cannot build: go-ipfs must be built from within your $GOPATH directory. #3234

Closed
progval opened this issue Sep 18, 2016 · 3 comments
Closed

Comments

@progval
Copy link

progval commented Sep 18, 2016

Version information:

git master

Type:

Bug

Priority:

P3

Description:

Every time I run make build, I get this: go-ipfs must be built from within your $GOPATH directory.

I tried the following:

 ipfs@particle  ~/gopath/go-ipfs   master ●  export GOPATH=$PWD
 ipfs@particle  ~/gopath/go-ipfs   master ●  make build
go-ipfs must be built from within your $GOPATH directory.
expected within '/home/ipfs/gopath/go-ipfs' but got '/home/ipfs/gopath/go-ipfs'
Makefile:49 : la recette pour la cible « path_check » a échouée
make: *** [path_check] Erreur 1
 ✘ ipfs@particle  ~/gopath/go-ipfs   master ●  export GOPATH=$HOME/gopath
 ipfs@particle  ~/gopath/go-ipfs   master ●  make build                
go-ipfs must be built from within your $GOPATH directory.
expected within '/home/ipfs/gopath' but got '/home/ipfs/gopath/go-ipfs'
Makefile:49 : la recette pour la cible « path_check » a échouée
make: *** [path_check] Erreur 1

I am new to building Go applications, I may have missed something about how $GOPATH works.

@ghost
Copy link

ghost commented Sep 18, 2016

export GOPATH=$PWD

go-ipfs must be $GOPATH/src/github.com/ipfs/go-ipfs, so that it matches the imports in the code. You can move it there, or symlink it (that's what I do).

@mateon1
Copy link
Contributor

mateon1 commented Sep 18, 2016

The GoPath is a Go specific location, if you set $GoPath, then use go get github.com/ipfs/go-ipfs it should download to the correct directory.

@progval
Copy link
Author

progval commented Sep 18, 2016

It works, thanks!

@progval progval closed this as completed Sep 18, 2016
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

2 participants