I am in the process of experimenting with the various package manager offerings on, well, offer for Go. I like what I read in gopm - simple. However, thus far I cannot get past the very first hurdle. Here is what I am doing
- Install gopm from source via
go get github.com/gpmgo/gopm
- Check that it did install.
whereis gopm
returns/opt/gopkg/bin/gopm
- For good measure check my environment variables.
echo $GOPATH
returns/opt/gopkg
. Create main.go under
/var/www/html/rest
. The code readspackage main import("github.com/astaxie/beego")
func main(){ println("Beego version:beego.VERSION) }
Create the .gopmfile. It reads [target] path=rest
Switch to the
/var/www/html/rest
folder. At this point it containsroot root 20 Jun 25 09:13 .gopmfile root root 107 Jun 25 09:13 main.go
Now issue a
gopm build
. which comes back with [GOPM] 15-06-25 09:28:13 [FATAL]: package not installed github.com/astaxie/beegoExamine the
/var/www/html/rest
folder. It now contains an additional folder.vendor
which in turn contains the foldersrc
which in turn has a symlink to the/var/www/html/rest
folder.
What am I doing wrong here?
You did not include the dependencies section in your .gopmfile file, which should look something like this: