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 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 are properly configured, etc.).
5 Answers 5
That file is part of the libpq-dev
package:
So try installing libpq-dev
which is the development library for postgresql:
sudo apt-get install libpq-dev
I wrote this script time ago, about install PostgreSQL 9.1 and PostGIS 2.0.1, but it's still useful.
https://gist.github.com/Tab3r/3076516
Follow it.
A few months ago, I installed all this stuff on my Ubuntu 12.04 machine, and documented every step. I actually installed PostgreSQL 9.1 through the Ubuntu software center, but then built GDAL, GEOS, and PostGIS from source. For detailed instructions of how I got things going (which may not be the easiest or best way to do things), start here:
You can also install postgis using the Ubuntu package system.
sudo apt-get install postgis
-
but where does that pull from?Inactivated Account– Inactivated Account2013年11月01日 21:27:10 +00:00Commented Nov 1, 2013 at 21:27
See instructions, including dependencies here: http://trac.osgeo.org/postgis/wiki/UsersWikiPostGIS20Ubuntu1204src
Explore related questions
See similar questions with these tags.