pgxman makes installing Postgres extensions as easy as installing any other software package.

Install pgxman

Using curl

curl -sfL https://install.pgx.sh | sh -

Using brew

brew install pgxman/tap/pgxman
Docker is required to run pgxman on MacOS.

Find and install an extension

pgxman search vector

Install

pgxman install pgvector

Connect to Postgres

# mac - connect to the container pgxman creates
$ psql postgres://postgres:[email protected]/postgres

# linux - restart postgres so it picks up newly installed extensions, then connect
$ sudo service postgresql restart
$ sudo -u postgres psql

Give it a try

postgres=# select * from pg_available_extensions;
...
postgres=# create extension vector;
CREATE EXTENSION