pg.ddx.io pgvector/pgvector GitHub issues and pull requests
help / color / mirror / Atom feed[pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory
8+ messages / 3 participants
[nested] [flat]
* [pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory
@ 2025-05-04 06:24 "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
0 siblings, 0 replies; 8+ messages in thread
From: TopCoder2K (@TopCoder2K) @ 2025-05-04 06:24 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
I'm trying to upgrade from 0.7.3 to 0.7.4. The 0.7.3 version was installed by another user and worked fine. When I run `make`, I get the error though `postgresql-server-dev-12` is installed (I have PostgreSQL 12.17). What should I check/do?
Some results:
```
$ cd /tmp/
$ git clone --branch v0.7.4 https://github.com/pgvector/pgvector.git
$ cd pgvector/
$ sudo apt install postgresql-server-dev-12
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
postgresql-client-16
Use 'sudo apt autoremove' to remove it.
The following packages will be upgraded:
postgresql-server-dev-12
1 upgraded, 0 newly installed, 0 to remove and 188 not upgraded.
Need to get 1003 kB of archives.
After this operation, 19.5 kB of additional disk space will be used.
Get:1 http://apt.postgresql.org/pub/repos/apt focal-pgdg/main amd64 postgresql-server-dev-12 amd64 12.22-2.pgdg20.04+1 [1003 kB]
Fetched 1003 kB in 0s (4642 kB/s)
(Reading database ... 109466 files and directories currently installed.)
Preparing to unpack .../postgresql-server-dev-12_12.22-2.pgdg20.04+1_amd64.deb ...
Unpacking postgresql-server-dev-12 (12.22-2.pgdg20.04+1) over (12.19-1.pgdg20.04+1) ...
Setting up postgresql-server-dev-12 (12.22-2.pgdg20.04+1) ...
$ make
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fstack-protector-strong -Wformat -Werror=format-security -fno-omit-frame-pointer -march=native -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -fPIC -fvisibility=hidden -I. -I./ -I/usr/include/postgresql/16/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/bitutils.o src/bitutils.c
src/bitutils.c:1:10: fatal error: postgres.h: No such file or directory
1 | #include "postgres.h"
| ^~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: src/bitutils.o] Error 1
```
^ permalink raw [nested|flat] 8+ messages in thread
* Re: [pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory
@ 2025-05-04 06:36 "ankane (@ankane)" <noreply+ankane@github.com>
6 siblings, 0 replies; 8+ messages in thread
From: ankane (@ankane) @ 2025-05-04 06:36 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Hi @TopCoder2K, see the [installation notes](https://github.com/pgvector/pgvector?tab=readme-ov-file#postgres-location).
^ permalink raw [nested|flat] 8+ messages in thread
* Re: [pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory
@ 2025-05-04 06:36 "ankane (@ankane)" <noreply+ankane@github.com>
6 siblings, 0 replies; 8+ messages in thread
From: ankane (@ankane) @ 2025-05-04 06:36 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane closed this.
^ permalink raw [nested|flat] 8+ messages in thread
* Re: [pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory
@ 2025-05-04 06:44 "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
6 siblings, 0 replies; 8+ messages in thread
From: TopCoder2K (@TopCoder2K) @ 2025-05-04 06:44 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@ankane, I've already seen [Missing Header](https://github.com/pgvector/pgvector?tab=readme-ov-file#missing-header) and other problems seem irrelevant. Which part of installation notes should I check?
^ permalink raw [nested|flat] 8+ messages in thread
* Re: [pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory
@ 2025-05-04 06:49 "ankane (@ankane)" <noreply+ankane@github.com>
6 siblings, 0 replies; 8+ messages in thread
From: ankane (@ankane) @ 2025-05-04 06:49 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
The section in the link (`pg_config` is pointing to the wrong Postgres instance - the installation output includes `-I/usr/include/postgresql/16/server`).
^ permalink raw [nested|flat] 8+ messages in thread
* Re: [pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory
@ 2025-05-04 07:13 "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
6 siblings, 0 replies; 8+ messages in thread
From: TopCoder2K (@TopCoder2K) @ 2025-05-04 07:13 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Ah, I see. Since I'm not the server administrator, I didn't even know about this. Thank you! I've successfully installed 0.7.4 👍
^ permalink raw [nested|flat] 8+ messages in thread
* Re: [pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory
@ 2025-05-13 11:29 "edstevo (@edstevo)" <noreply+edstevo@github.com>
6 siblings, 0 replies; 8+ messages in thread
From: edstevo (@edstevo) @ 2025-05-13 11:29 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
I'm trying to install this on digital ocean - I've followed the installation notes and set the PG_CONFIG:
```
forge@GKXN60JIV2:/tmp/pgvector$ echo $PG_CONFIG
/usr/lib/postgresql/17/bin/pg_config
```
I run sudo --preserve-env=PG_CONFIG make install:
```
forge@GKXN60JIV2:/tmp/pgvector$ sudo --preserve-env=PG_CONFIG make install
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3 -Wcast-function-type -Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation -Wno-stringop-truncation -g -g -O2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -flto=auto -ffat-lto-objects -fstack-protector-strong -fstack-clash-protection -Wformat -Werror=format-security -fcf-protection -fno-omit-frame-pointer -march=native -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math -fPIC -fvisibility=hidden -I. -I./ -I/usr/include/postgresql/17/server -I/usr/include/postgresql/internal -Wdate-time -D_FORTIFY_SOURCE=3 -D_GNU_SOURCE -I/usr/include/libxml2 -c -o src/bitutils.o src/bitutils.c
src/bitutils.c:1:10: fatal error: postgres.h: No such file or directory
1 | #include "postgres.h"
| ^~~~~~~~~~~~
compilation terminated.
make: *** [<builtin>: src/bitutils.o] Error 1
```
it seems to still be pointing to the wrong pg instance?
^ permalink raw [nested|flat] 8+ messages in thread
* Re: [pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory
@ 2025-05-13 15:45 "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
6 siblings, 0 replies; 8+ messages in thread
From: TopCoder2K (@TopCoder2K) @ 2025-05-13 15:45 UTC (permalink / raw)
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
@edstevo, have you tried the command from [Missing Header](https://github.com/pgvector/pgvector?tab=readme-ov-file#missing-header)?
^ permalink raw [nested|flat] 8+ messages in thread
end of thread, other threads:[~2025-05-13 15:45 UTC | newest]
Thread overview: 8+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-05-04 06:24 [pgvector/pgvector] issue #834: Ubuntu 20.04: fatal error: postgres.h: No such file or directory "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
2025-05-04 06:36 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-05-04 06:36 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-05-04 06:44 ` "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
2025-05-04 06:49 ` "ankane (@ankane)" <noreply+ankane@github.com>
2025-05-04 07:13 ` "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
2025-05-13 11:29 ` "edstevo (@edstevo)" <noreply+edstevo@github.com>
2025-05-13 15:45 ` "TopCoder2K (@TopCoder2K)" <noreply+TopCoder2K@github.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox