Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error on mgo dependency when deploying go app to Heroku

Tags:

heroku

go

I'm trying to deploy a Go App to Heroku, I'm using godeps for dependency management as their docs suggested. But when I git push heroku master I get the following error telling that the file sasl.go doesn't exists.

remote: # github.com/grsouza/feeng-api/vendor/gopkg.in/mgo.v2/internal/sasl
remote: vendor/gopkg.in/mgo.v2/internal/sasl/sasl.go:15:24: fatal error: sasl/sasl.h: No such file or directory
remote:  // #include <sasl/sasl.h>
remote:                         ^
remote: compilation terminated.
remote: github.com/grsouza/feeng-api/vendor/github.com/onsi/gomega
remote: 
remote:  !     Push rejected, failed to compile Go app
remote: 
remote: Verifying deploy....
remote: 
remote: !   Push rejected to limitless-ridge-36512.
remote: 
To https://git.heroku.com/limitless-ridge-36512.git
 ! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'https://git.heroku.com/limitless-ridge-36512.git'

Can anyone help me with this issue?

Thanks.

like image 882
Guilherme Souza Avatar asked Mar 14 '16 15:03

Guilherme Souza


1 Answers

Do you use godep save ./... in your project?

If yes, delete the Godep and vendor directories and try to use godep save, without ./....

I do this and work for me.

like image 160
Besser Avatar answered Oct 26 '22 08:10

Besser