Reputation: 13
I'm trying to run postgres along with pgvector but getting this error: UndefinedFile: could not open extension control file "/usr/share/postgresql/14/extension/vector.control": No such file or directory
on ubuntu 24.04
Here's what my code block looks like in jupyter notebook:
async def main():
conn = await psycopg.AsyncConnection.connect(dbname='pgvector_example', autocommit=True)
await create_schema(conn)
await insert_data(conn)
# perform queries in parallel
results = await asyncio.gather(semantic_search(conn, query), keyword_search(conn, query))
results = rerank(query, results)
print(results)
#use this in Jupyter notebook
await main()
`
I've already installed pgvector and postgres as mentioned here in docs,and created pgvector_example
db in postgres.
On running CREATE EXTENSION IF NOT EXISTS pgvector;
in postgres, I got the same error
ERROR: could not open extension control file "/usr/share/postgresql/14/extension/vector.control": No such file or directory
Edit
On running SELECT * FROM pg_available_extensions;
it outputs list of extensions and does NOT contain pg_vector
Upvotes: 1
Views: 1141