PostgreSQL 9.4.1 Documentation | |||
---|---|---|---|
Prev | Up | Chapter 15. Installation from Source Code | Next |
15.2. Requirements
In general, a modern Unix-compatible platform should be able to runPostgreSQL. The platforms that had received specific testing at the time of release are listed inSection 15.6 below. In thedoc subdirectory of the distribution there are several platform-specificFAQ documents you might wish to consult if you are having trouble. The following software packages are required for buildingPostgreSQL: GNUmake version 3.80 or newer is required; othermake programs or olderGNUmake versions willnot work. (GNUmake is sometimes installed under the namegmake.) To test forGNUmake enter: You need anISO/ANSI C compiler (at least C89-compliant). Recent versions ofGCC are recommended, butPostgreSQL is known to build using a wide variety of compilers from different vendors. tar is required to unpack the source distribution, in addition to eithergzip orbzip2. The following packages are optional. They are not required in the default configuration, but they are needed when certain build options are enabled, as explained below: To build the server programming languagePL/Perl you need a fullPerl installation, including thelibperl library and the header files. SincePL/Perl will be a shared library, thelibperl library must be a shared library also on most platforms. This appears to be the default in recentPerl versions, but it was not in earlier versions, and in any case it is the choice of whomever installed Perl at your site. If you intend to make more than incidental use ofPL/Perl, you should ensure that thePerl installation was built with theusemultiplicity option enabled (perl -V will show whether this is the case). If you don't have the shared library but you need one, a message like this will appear during thePostgreSQL build to point out this fact: (If you don't follow the on-screen output you will merely notice that thePL/Perl library object,plperl.so or similar, will not be installed.) If you see this, you will have to rebuild and installPerl manually to be able to buildPL/Perl. During the configuration process forPerl, request a shared library. To build thePL/Python server programming language, you need aPython installation with the header files and thedistutils module. The minimum required version isPython 2.3. (To work with function arguments of typenumeric, a 2.3.x installation must include the separately-availablecdecimal module; note thePL/Python regression tests will not pass if that is missing.)Python 3 is supported if it's version 3.1 or later; but seeSection 43.1 when using Python 3. SincePL/Python will be a shared library, thelibpython library must be a shared library also on most platforms. This is not the case in a defaultPython installation. If after building and installingPostgreSQL you have a file calledplpython.so (possibly a different extension), then everything went well. Otherwise you should have seen a notice like this flying by: That means you have to rebuild (part of) yourPython installation to create this shared library. If you have problems, runPython 2.3 or later's configure using the--enable-shared flag. On some operating systems you don't have to build a shared library, but you will have to convince thePostgreSQL build system of this. Consult theMakefile in thesrc/pl/plpython directory for details. To build thePL/Tcl procedural language, you of course need aTcl installation. If you are using a pre-8.4 release ofTcl, ensure that it was built without multithreading support. To enable Native Language Support (NLS), that is, the ability to display a program's messages in a language other than English, you need an implementation of theGettextAPI. Some operating systems have this built-in (e.g.,Linux,NetBSD,Solaris), for other systems you can download an add-on package fromhttp://www.gnu.org/software/gettext/. If you are using theGettext implementation in theGNU C library then you will additionally need theGNU Gettext package for some utility programs. For any of the other implementations you will not need it. You needKerberos,OpenSSL,OpenLDAP, and/orPAM, if you want to support authentication or encryption using those services. To build thePostgreSQL documentation, there is a separate set of requirements; seeSection J.2. If you are building from aGit tree instead of using a released source package, or if you want to do server development, you also need the following packages: GNUFlex andBison are needed to build from a Git checkout, or if you changed the actual scanner and parser definition files. If you need them, be sure to getFlex 2.5.31 or later andBison 1.875 or later. Otherlex andyacc programs cannot be used. Perl 5.8 or later is needed to build from a Git checkout, or if you changed the input files for any of the build steps that use Perl scripts. If building on Windows you will needPerl in any case.Perl is also required to run some test suites. If you need to get aGNU package, you can find it at your localGNU mirror site (seehttp://www.gnu.org/order/ftp.html for a list) or atftp://ftp.gnu.org/gnu/. Also check that you have sufficient disk space. You will need about 100 MB for the source tree during compilation and about 20 MB for the installation directory. An empty database cluster takes about 35 MB; databases take about five times the amount of space that a flat text file with the same data would take. If you are going to run the regression tests you will temporarily need up to an extra 150 MB. Use thedf command to check free disk space.make --version
*** Cannot build PL/Perl because libperl is not a shared library.*** You might have to rebuild your Perl installation. Refer to*** the documentation for details.
*** Cannot build PL/Python because libpython is not a shared library.*** You might have to rebuild your Python installation. Refer to*** the documentation for details.