Sergei Egorov
Sergei Egorov

Reputation: 11

Installing pgvector extension on mac for postgres

I'm trying to install postgres vector extension on my mac but am getting

1 error generated.
make: *** [src/ivfbuild.o] Error 1
clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -O2 -march=native -ftree-vectorize -fassociative-math -fno-signed-zeros -fno-trapping-math  -I. -I./ -I/usr/local/include/postgresql/server -I/usr/local/include/postgresql/internal -I/usr/local/Cellar/icu4c/69.1/include -isysroot /Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk -I/usr/local/opt/[email protected]/include -I/usr/local/opt/readline/include   -c -o src/ivfbuild.o src/ivfbuild.c
clang: warning: no such sysroot directory: '/Library/Developer/CommandLineTools/SDKs/MacOSX11.sdk' [-Wmissing-sysroot]
In file included from src/ivfbuild.c:1:
In file included from /usr/local/include/postgresql/server/postgres.h:46:
/usr/local/include/postgresql/server/c.h:59:10: fatal error: 'stdio.h' file not
      found
#include <stdio.h>
         ^~~~~~~~~
1 error generated.
make: *** [src/ivfbuild.o] Error 1

Here's what I did:

Followed the installation guide as shown on github: '

ed /tmp cd pgvector
make
git clone --branch v0.4.4 https://github.com/pgvector/pgvector.git
make install # may need sudo

Upvotes: 1

Views: 1800

Answers (1)

msimons
msimons

Reputation: 505

Make sure that you have the Xcode command line tools installed

xcode-select --install

Upvotes: 1

Related Questions