Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cabal cannot install postgresql-libpq-0.9.0.2

Tags:

haskell

cabal

Both cabal install postgresql-libpq-0.9.0.2 and cabal install --reinstall postgresql-libpq-0.9.0.2 didnt work

Configuring postgresql-libpq-0.9.0.2...
setup.exe: The program pg_config is required but it could not be found.
cabal: Error: some packages failed to install:
postgresql-libpq-0.9.0.2 failed during the configure step. The exception was:
ExitFailure 1

Note: I am on local

like image 285
antonniette sumatra Avatar asked Feb 02 '15 22:02

antonniette sumatra


2 Answers

It looks like you need the external program pg_config which presumably comes with postgres. Make sure that postgres is installed correctly and all of its binaries are in your path.

I'm assuming you're on Windows, in which case install the postgres bindings is tricky. Take a look at instructions here and here which are for libraries that depend on postgresql-libpq and make sure that you followed all the relevant steps.

The most relevant part to your current problem is updating your Path variable and adding something like C:\Program Files\PostgreSQL\9.2\bin, as detailed in the first link.

like image 111
Tikhon Jelvis Avatar answered Oct 21 '22 22:10

Tikhon Jelvis


What worked for me was to install postgres for the correct CPU architecture from: http://www.postgresql.org/download/windows/ and after that adding the bin folder to the system path.

like image 41
Răzvan Flavius Panda Avatar answered Oct 21 '22 23:10

Răzvan Flavius Panda