postgrespro / hunspell_dicts

Hunspell dictionaries for PostgreSQL
Other
63 stars 17 forks source link

Installing when pg_config gives the wrong version #2

Open lesliev opened 7 years ago

lesliev commented 7 years ago

Thanks for doing this, it makes installing these dictionaries way easier!

If someone else out there once had other versions of Postgres installed, pg_config can provide paths to the wrong version of Postgres and the installation will fail.

Since I am using Postgres 9.1 and pg_config --version was returning 9.6, I had to:

  1. sudo apt-get install postgresql-server-dev-9.1
  2. Replace PG_CONFIG = pg_config with PG_CONFIG = /usr/lib/postgresql/9.1/bin/pg_config in the Makefile
za-arthur commented 7 years ago

Hello. As I can understand you have two installations of PostgreSQL. You right in current version you need pg_config to install the hunspell_dicts extensions and execute the command:

make USE_PGXS=1 PG_CONFIG = /usr/lib/postgresql/9.1/bin/pg_config install

I am not good at various Linux distributions. As far as I know pg_config also is distributed by the libpq-dev package in Ubuntu.

But after your question I got the idea that dictionaries can be installed without pg_config and just by providing installation path. I will think about how to implement it.