From: Luminilion (@Luminilion) <noreply+Luminilion@github.com>
To: pgvector/pgvector <noreply+pgvector-pgvector@github.com>
Subject: Re: [pgvector/pgvector] issue #592: can't make pgvector
Date: Fri, 21 Jun 2024 12:40:39 +0000
Message-ID: <gh-pgvector-pgvector-592-c2182679096@github.com> (raw)
In-Reply-To: <gh-pgvector-pgvector-592@github.com>
References: <gh-pgvector-pgvector-592@github.com>
Had the same problem and indeed `make` (as instructed for Linux and Mac in the `README`) uses the Command Line Tools referred to by Postgresql. So it's not pgvector's fault.
In my case, it's because the Mac installer from https://www.postgresql.org/download/ installs Postgresql configured to use outdated version of Command Line Tools.
I solved it like this:
- Uninstall Postgresql (there is an uninstall file in `/Library/Postgresql/16/`)
- Install it again using homebrew: `brew install postgresql@16`
- Run `pg_config`, you should have the installed version of Command Line Tools configured
- If `pg_config` fails, maybe you forgot to export the bin folder path. To do so run: `echo 'export PATH="/opt/homebrew/opt/postgresql@16/bin:$PATH"' >> ~/.zshrc`
- Then `make` ... (as per installation instructions)
Here are some other things to try:
- Check that indeed it's the case by running `pg_config`. You should see the faulty SDK.
- Try to reinstall Command Line Tools to see if this gets you the right version
- Rename `/Library/Developer/CommandLineTools` to `/Library/Developer/CommandLineTools_BACKUP` or whatever, for an eventual backup.
- run `xcode-select --install`
- Follow the install wizard
- Check if you now have the right SDKs inside `/Library/Developer/CommandLineTools/SDKs/`
- Otherwise you can try to install the (most probably) outdated version from https://developer.apple.com/download/all/ (You need an apple ID to login).
- In my case it simply told me none of the disks were an option for the installation because the OS does not support it.