Resolving dependencies... Configuring libpq-0.1... Building libpq-0.1... Preprocessing library libpq-0.1... PQ.hsc:140:22: fatal error: libpq-fe.h: No such file or directory compilation terminated. compiling dist/build/Database/PQ_hsc_make.c failed (exit code 1) command was: /usr/bin/gcc -c dist/build/Database/PQ_hsc_make.c -o dist/build/Database/PQ_hsc_make.o -fno-stack-protector -D__GLASGOW_HASKELL__=710 -Dlinux_BUILD_OS=1 -Dx86_64_BUILD_ARCH=1 -Dlinux_HOST_OS=1 -Dx86_64_HOST_ARCH=1 -Idist/build/autogen -include dist/build/autogen/cabal_macros.h -I/opt/ghc/7.10.2/lib/ghc-7.10.2/unix_A3WgcI5QiHK4PDo4jSYdwQ/include -I/opt/ghc/7.10.2/lib/ghc-7.10.2/time_AXTdBF9VRQoBOqJT6qtmVH/include -I/opt/ghc/7.10.2/lib/ghc-7.10.2/bytes_6elQVSg5cWdFrvRnfxTUrH/include -I/opt/ghc/7.10.2/lib/ghc-7.10.2/base_GDytRqRVSUX7zckgKqJjgw/include -I/opt/ghc/7.10.2/lib/ghc-7.10.2/integ_2aU3IZNMF9a7mQ0OzsZ0dS/include -I/opt/ghc/7.10.2/lib/ghc-7.10.2/include -I/opt/ghc/7.10.2/lib/ghc-7.10.2/include/ Failed to install libpq-0.1 cabal: Error: some packages failed to install: libpq-0.1 failed during the building phase. The exception was: ExitFailure 1