Error Cannot Find Libpq-fe.h
here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Stack Overflow Questions Jobs Documentation Tags Users Badges Ask Question x Dismiss Join the Stack Overflow Community Stack Overflow is a community of 4.7 million programmers, just like you, helping each other. Join them; it only takes a minute: Sign up Can't find the 'libpq-fe.h header when trying to install pg gem up vote 463 down vote favorite 93 I am using rails 3.1 pre version. I like to use PostgreSQL but the problem is installing the pg gem. It gives me the following error: demonchand@system-001:~/exercise/personal/pro$ gem install pg Building native extensions. This could take a while... ERROR: Error installing pg: ERROR: Failed to build gem native extension. /home/demonchand/.rvm/rubies/ruby-1.9.2-p0/bin/ruby extconf.rb checking for pg_config... no No pg_config... trying anyway. If building fails, please try again with --with-pg-config=/path/to/pg_config checking for libpq-fe.h... no Can't find the 'libpq-fe.h header *** extconf.rb failed *** Could not create Makefile due to some reason, probably lack of necessary libraries and/or headers. Check the mkmf.log file for more details. You may need configuration options. Provided configuration options: --with-opt-dir --without-opt-dir --with-opt-include --without-opt-include=${opt-dir}/include --with-opt-lib --without-opt-lib=${opt-dir}/lib --with-make-prog --without-make-prog --srcdir=. --curdir --ruby=/home/demonchand/.rvm/rubies/ruby-1.9.2-p0/bin/ruby --with-pg --without-pg --with-pg-dir --without-pg-dir --with-pg-include --without-pg-include=${pg-dir}/include --with-pg-lib --without-pg-lib=${pg-dir}/lib --with-pg-config --without-pg-config --with-pg_config --without-pg_config Gem files will remain installed in /home/demonchand/.rvm/gems/ruby-1.9.2-p0/gems/pg-0
Badges sign up log in tour help Tour Start here for a quick overview of the site Help Center Detailed answers to any questions you might have Meta Discuss the workings and policies of this site About Us Learn more about Stack Overflow the company Business Learn more about hiring developers or posting ads with us Geographic Information Systems Questions Tags Users Badges Unanswered Ask Question _ Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute: Sign up Here's how it works: Anybody can ask a question Anybody can answer The best http://stackoverflow.com/questions/6040583/cant-find-the-libpq-fe-h-header-when-trying-to-install-pg-gem answers are voted up and rise to the top Unable to install the PostGIS extension to PostgreSQL on Ubuntu 12.04 LTS up vote 1 down vote favorite 1 I just installed Linux Ubuntu 12.04 LTS (on a virtual machine). I then successfully installed the PostgreSQL 8.4 database management system. I am now trying to install PostGIS, which is an extension to PostgreSQL used for Geographical Information Systems capabilities. I followed http://gis.stackexchange.com/questions/59061/unable-to-install-the-postgis-extension-to-postgresql-on-ubuntu-12-04-lts the instructions for installing PostGIS on this webpage: http://postgis.net/docs/manual-2.0/postgis_installation.html Section 2.4.1 ("Configuration") on this webpage tells me to type "./configure". I did this. The output (about 100 lines of mostly incomprehensible statements) included about one dozen instances of the following error message: You need to install postgresql-server-dev-X.Y for building a server-side extension or libpq-dev for building a client-side application. At the end of the output, the following lines were outputted: checking libpq-fe.h usability... no checking libpq-fe.h presence... no checking for libpq-fe.h... no configure: error: could not find libpq-fe.h I have no idea what caused these errors or how to fix them. I would appreciate any assistance or pointers. NOTE: the above-linked webpage includes a section 2.2 ("Requirements") which lists eight required software packages: PostgreSQL 8.4 GNU C compiler (gcc) GNU Make (gmake or make) Proj4 reprojection library, version 4.6.0 or greater GEOS geometry library, version 3.2.2 or greater LibXML2, version 2.5.x or higher JSON-C, version 0.9 or higher GDAL, version 1.6 or higher I just installed PostgreSQL 8.4, and I am pretty sure that the GNU C compiler is also installed on my computer. But I do not know whether I have the other six software packages installed or not (or if they are installed, whether they ar
Sign in Pricing Blog Support Search GitHub This https://github.com/esheldon/sdssidl/issues/1 repository Watch 0 Star 0 Fork 0 esheldon/sdssidl Code Issues 1 Pull requests 0 Projects 0 Pulse Graphs New issue cannot compile pgsql_query.c; cannot find libpq-fe.h #1 Open GoogleCodeExporter opened this Issue Sep 28, 2015 · 1 comment Projects None yet Labels error cannot auto-migrated Priority-Medium Type-Defect Milestone No milestone Assignees No one assigned 1 participant GoogleCodeExporter commented Sep 28, 2015 What version of the product are you using? On what operating system? 1.6.1 on MacOS 10.6.4 I have installed postgresql 8.3 using fink rgm@caml18-2(/sw/include/postgresql){147}> locate error cannot find libpq-fe.h /sw/include/postgresql/libpq-fe.h When a run make, I get this error. Making pgsql gcc -I/Applications/itt/idl70/external/include -Wall -dynamic -m64 -I/sw/include -c -o pgsql_query.o pgsql_query.c pgsql_query.c:67:22: error: libpq-fe.h: No such file or directory In file included from pgsql_query.c:71: pgsql_query.h:108: error: expected ‘)’ before ‘*’ token pgsql_query.h:157: error: expected ‘)’ before ‘*’ token pgsql_query.h:161: error: expected ‘)’ before ‘*’ token pgsql_query.h:170: error: expected ‘)’ before ‘*’ token pgsql_query.c: In function ‘IDL_Load’: pgsql_query.c:151: warning: missing braces around initializer pgsql_query.c:151: warning: (near initialization for ‘function_addr[0].funct_addr’) make[2]: *** [pgsql_query.o] Error 1 make[1]: *** [all] Error 2 make: *** [all] Error 2 Please provide any additional information below. For info I have managed to get psycopg2 compiled and working with fink and python2.6 psycopg2 faq mentions similar problems In the http://initd.org/psycopg/docs/faq.html#problems-compiling-psycopg-from-source Original issue reported on code.google.com by richardgmcmaho