I'm trying to install postgres vector extension on my mac but am getting
ERROR: extension "vector" has no installation script nor update path for version "0.4.0".
Here's what I did:

But when I ran CREATE EXTENSION vector; got an error:
ERROR: could not open extension control file "/Applications/Postgres.app/Contents/Versions/13/share/postgresql/extension/vector.control": No such file or directory
I copied the content of pgvector into posgresql/extension using:
sudo cp -r ~/Downloads/pgvector/* /Applications/Postgres.app/Contents/Versions/13/share/postgresql/extension/
Tried running CREATE EXTENSION vector; now the error is:
ERROR: extension "vector" has no installation script nor update path for version "0.4.0".
Anyone here seen this problem?
By the way am using PostgreSQL 13.10
I had this same issue and was able to fix it.
Even though I installed PG via the PG app, I tried to install this extension using Homebrew. This messed up some of the PG config settings.
Running this on the command line,
pg_config --libdir
Gave this output: /opt/homebrew/share/postgresql@14
This is not good for a Postgres.app install.
The Fix (reset pg configs)
Assuming Postgres.app install!
brew uninstall pgvector
brew uninstall postgresql
Now run:
pg_config --libdir
I get: /Applications/Postgres.app/Contents/Versions/14/lib
Now, install pgvector using the Makefile approach.
Don't (as OP did), just copy the pgvector files to the Postgress extensions directory. This will create an invalid directory structure.
I believe make install will place the files in the proper place. If CREATE EXTENSION vector; still fails, you can check the following to ensure the files are in the right place.
The Fix
You should have the following files installed in the following directories.
All .SQL and .control files. Ensure these files are in the following directory
/Applications/Postgres.app/Contents/Versions/14/share/postgresql/extension
vector.so is in the following directory
/Applications/Postgres.app/Contents/Versions/14/lib/postgresql
Install the extension
psql <your db>
CREATE EXTENSION vector;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With