microo8/plgo

CentOS 7 postgres.h error

GrandFelix opened this issue · 9 comments

Hi,

Im getting this when trying to install it:

# github.com/microo8/plgo
/root/go/src/github.com/microo8/plgo/pl.go:7:22: fatal error: postgres.h: No such file or directory
 #include "postgres.h"
                      ^
compilation terminated.

I have installed all devel packages etc. Im on Pg9.6, CentOS 7

plgo runs pg_config --includedir-server to add the include path for pg header files.

What it prints if you run it in terminal?

If you just install it, don't worry if you have this error. The main thing is that you got the plgo command.

I get /usr/pgsql-9.6/include/server and also there is postgres.h header file

And after you run go get -u github.com/microo8/plgo/... you have the plgo command, or it fails?

Try also to run just go get -u github.com/microo8/plgo/plgo

This does not return any error but I dont have plgo command. Im new to go environment so maybe I did forget on something?

Check if the plgo binary exists in $GOPATH/bin/

Yes it is, in home.../go/ because i did not have $GOPATH configured. Everything is OK now. Thank you

You can add to your $PATH the $GOPATH/bin, so you can run commands directly, right when you go get something.

Ok, will do that. Thank you!