p6uvrg
Last Updated: February 25, 2016
·
2.168K
· ikhthiandor

Proper way to update or rebuild golang packages

https://groups.google.com/forum/#!topic/golang-dev/ZWFCitgOD3E

To solve error like this while trying to upgrade go-qml for go1.3.3

GOPATH/src/gopkg.in/qml.v1/bridge.go:23: import GOPATH/pkg/linux_amd64/gopkg.in/qml.v1/cdata.a: object is [linux amd64 go1.3.1 X:precisestack] expected [linux amd64 go1.3.3 X:precisestack]

I did this

rm -rf $GOPATH/pkg

Then retried upgrading by

go get -u -v gopkg.in/qml.v1/

Now go was able to upgrade the package without any fuss.

Verbose output on the terminal:
<br/>
gopkg.in/qml.v1 (download)
<br/>
gopkg.in/qml.v1/cdata
<br/>
gopkg.in/qml.v1/gl/glbase
<br/>
gopkg.in/qml.v1