Skip to content

Solution: No such file "postgres.h" when compiling #10

@davehouser1

Description

@davehouser1

If you get this error on Kali or debian based systems:

lib_postgresqludf_sys.c:34:10: fatal error: postgres.h: No such file or directory
   34 | #include <postgres.h>
      |          ^~~~~~~~~~~~
compilation terminated.

Need to install postgres dev package.
Run the following where "XXX" is the version available to install from apt:

sudo apt-cache search postgresql-server-dev
sudo apt install postgresql-server-dev-XXX

Also run the following to locate where the file is after install
find / -name "postgres.h" -print 2>/dev/null

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions