PostgreSQL の pgvector のインストール方法のメモ。
redhat-rpm-config のインストール
redhat-rpm-config がインストールされていない場合、以下で redhat-rpm-config をインストールする。
sudo yum install redhat-rpm-config
pgvector のインストール
ソースをダウンロード
git clone --branch v0.8.0 https://github.com/pgvector/pgvector.git
環境変数の設定
export PATH="${PATH}:/usr/pgsql-17/bin" export PG_CONFIG=/usr/pgsql-17/bin/pg_config
インストール
cd pgvector make sudo --preserve-env=PG_CONFIG make install
確認
ls /usr/pgsql-17/lib/bitcode vector vector.index.bc