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

Strange behavior with composite GOPATH: can't load package #71

Open
bLuka opened this issue Sep 6, 2018 · 0 comments
Open

Strange behavior with composite GOPATH: can't load package #71

bLuka opened this issue Sep 6, 2018 · 0 comments

Comments

@bLuka
Copy link

bLuka commented Sep 6, 2018

I need to install lgo on the whole system.

Therefore I set $GOPATH to /usr/local/go during installation, and $LGOPATH to /usr/local/lgo.

I set the right permissions for my user in $LGOPATH.

When the user try to execute lgo run with a composite $GOPATH (like $HOME/go:/usr/local/go, currently /home/jovyan/go:/usr/local/go), here's what happen:

>>> import "fmt"
can't load package: package github.com/yunabe/lgo/sess7b2274696d65223a313533363235363333373931303835323634357d/exec1: cannot find package "github.com/yunabe/lgo/sess7b2274696d65223a313533363235363333373931303835323634357d/exec1" in any of:
	/usr/lib/go-1.10/src/github.com/yunabe/lgo/sess7b2274696d65223a313533363235363333373931303835323634357d/exec1 (from $GOROOT)
	/home/jovyan/go/src/github.com/yunabe/lgo/sess7b2274696d65223a313533363235363333373931303835323634357d/exec1 (from $GOPATH)
	/usr/local/go/src/github.com/yunabe/lgo/sess7b2274696d65223a313533363235363333373931303835323634357d/exec1
E0906 17:52:22.197192    2650 main.go:153] Failed to build a shared library of github.com/yunabe/lgo/sess7b2274696d65223a313533363235363333373931303835323634357d/exec1: exit status 1

When I change the $GOPATH to /usr/local/go without colons, everything works again.

It's a bit annoying since my home is a Docker volume and /usr/local/go is what was setup during the docker build.

Would there be a way to keep both paths with lgo?

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

1 participant