Bitwise
Bitwise

Reputation: 8461

(Postgrex.Error) ERROR 58P01 (undefined_file)

** (Postgrex.Error) ERROR 58P01 (undefined_file): could not open extension control file "/usr/local/Cellar/[email protected]/9.6.5/share/[email protected]/extension/postgis.control": No such file or directory

I'm getting this error when I try to run mix ecto.migrate...

Why is it looking at that path? I've tried moving postgis.control

If I run this command find /usr -name postgis.control it gives me this result:

/usr/local/Cellar/postgis/2.4.0_1/share/postgresql/extension/postgis.control
/usr/local/share/[email protected]/extension/postgis.control

Does anybody know how I can move postgis.control or what I could be doing wrong?

Upvotes: 3

Views: 10215

Answers (1)

Laurenz Albe
Laurenz Albe

Reputation: 246033

The file postgis.control should be in the extension subdirectory of the PostgreSQL share directory. You can find out the location of the share directory by running pg_config --sharedir.

All the other files that belong to the PostGIS extension must also be in place: the SQL files in the same directory as the control file, and the shared libraries in pg_config --libdir.

Upvotes: 3

Related Questions