tools / godep

dependency tool for go
http://godoc.org/github.com/tools/godep
BSD 3-Clause "New" or "Revised" License
5.54k stars 455 forks source link

Package (database/sql) not found #504

Closed nvartolomei closed 7 years ago

nvartolomei commented 8 years ago
 → godep save
godep: Package (database/sql) not found

 → godep version
godep v74 (darwin/amd64/go1.6.2)

ideas?

carlosmn commented 7 years ago

I've found this to happen when the version of go you're using (that godep shells out to) is different from the one which godep was built with. I had installed godep with 1.6 but I'm now using 1.7 and it looks like it can't tell that the built-in packages correspond to 1.7.

I re-installed godep with 1.7 and it's working again now.

nvartolomei commented 7 years ago

Forgot about this. The problem was fixed by exporting correct GOROOT env variable.