codekingpro/portable-devtools
115k
1<?xml version="1.0" encoding="UTF-8" standalone="no"?>2<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>17.1. Requirements</title><link rel="stylesheet" type="text/css" href="stylesheet.css" /><link rev="made" href="pgsql-docs@lists.postgresql.org" /><meta name="generator" content="DocBook XSL Stylesheets Vsnapshot" /><link rel="prev" href="installation.html" title="Chapter 17. Installation from Source Code" /><link rel="next" href="install-getsource.html" title="17.2. Getting the Source" /></head><body id="docContent" class="container-fluid col-10"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="5" align="center">17.1. Requirements</th></tr><tr><td width="10%" align="left"><a accesskey="p" href="installation.html" title="Chapter 17. Installation from Source Code">Prev</a> </td><td width="10%" align="left"><a accesskey="u" href="installation.html" title="Chapter 17. Installation from Source Code">Up</a></td><th width="60%" align="center">Chapter 17. Installation from Source Code</th><td width="10%" align="right"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="10%" align="right"> <a accesskey="n" href="install-getsource.html" title="17.2. Getting the Source">Next</a></td></tr></table><hr /></div><div class="sect1" id="INSTALL-REQUIREMENTS"><div class="titlepage"><div><div><h2 class="title" style="clear: both">17.1. Requirements <a href="#INSTALL-REQUIREMENTS" class="id_link">#</a></h2></div></div></div><p>3 In general, a modern Unix-compatible platform should be able to run4 <span class="productname">PostgreSQL</span>.5 The platforms that had received specific testing at the6 time of release are described in <a class="xref" href="supported-platforms.html" title="17.6. Supported Platforms">Section 17.6</a>7 below.8 </p><p>9 The following software packages are required for building10 <span class="productname">PostgreSQL</span>:11 12 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>13 <a id="id-1.6.4.5.3.2.1.1.1" class="indexterm"></a>14 15 <acronym class="acronym">GNU</acronym> <span class="application">make</span> version 3.81 or newer is required; other16 <span class="application">make</span> programs or older <acronym class="acronym">GNU</acronym> <span class="application">make</span> versions will <span class="emphasis"><em>not</em></span> work.17 (<acronym class="acronym">GNU</acronym> <span class="application">make</span> is sometimes installed under18 the name <code class="filename">gmake</code>.) To test for <acronym class="acronym">GNU</acronym>19 <span class="application">make</span> enter:20</p><pre class="screen">21<strong class="userinput"><code>make --version</code></strong>22</pre><p>23 </p></li><li class="listitem"><p>24 <a id="id-1.6.4.5.3.2.2.1.1" class="indexterm"></a>25 26 Alternatively, <span class="productname">PostgreSQL</span> can be built using27 <a class="ulink" href="https://mesonbuild.com/" target="_top">Meson</a>. This is currently28 experimental and only works when building from a Git checkout (not from29 a distribution tarball). If you choose to use30 <span class="application">Meson</span>, then you don't need31 <acronym class="acronym">GNU</acronym> <span class="application">make</span>, but the other32 requirements below still apply.33 </p><p>34 The minimum required version of <span class="application">Meson</span> is 0.54.35 </p></li><li class="listitem"><p>36 You need an <acronym class="acronym">ISO</acronym>/<acronym class="acronym">ANSI</acronym> C compiler (at least37 C99-compliant). Recent38 versions of <span class="productname">GCC</span> are recommended, but39 <span class="productname">PostgreSQL</span> is known to build using a wide variety40 of compilers from different vendors.41 </p></li><li class="listitem"><p>42 <span class="application">tar</span> is required to unpack the source43 distribution, in addition to either44 <span class="application">gzip</span> or <span class="application">bzip2</span>.45 </p></li><li class="listitem"><p>46 <a id="id-1.6.4.5.3.2.5.1.1" class="indexterm"></a>47 <a id="id-1.6.4.5.3.2.5.1.2" class="indexterm"></a>48 49 The <acronym class="acronym">GNU</acronym> <span class="productname">Readline</span> library is used by50 default. It allows <span class="application">psql</span> (the51 PostgreSQL command line SQL interpreter) to remember each52 command you type, and allows you to use arrow keys to recall and53 edit previous commands. This is very helpful and is strongly54 recommended. If you don't want to use it then you must specify55 the <code class="option">--without-readline</code> option to56 <code class="filename">configure</code>. As an alternative, you can often use the57 BSD-licensed <code class="filename">libedit</code> library, originally58 developed on <span class="productname">NetBSD</span>. The59 <code class="filename">libedit</code> library is60 GNU <span class="productname">Readline</span>-compatible and is used if61 <code class="filename">libreadline</code> is not found, or if62 <code class="option">--with-libedit-preferred</code> is used as an63 option to <code class="filename">configure</code>. If you are using a package-based64 Linux distribution, be aware that you need both the65 <code class="literal">readline</code> and <code class="literal">readline-devel</code> packages, if66 those are separate in your distribution.67 </p></li><li class="listitem"><p>68 <a id="id-1.6.4.5.3.2.6.1.1" class="indexterm"></a>69 70 The <span class="productname">zlib</span> compression library is71 used by default. If you don't want to use it then you must72 specify the <code class="option">--without-zlib</code> option to73 <code class="filename">configure</code>. Using this option disables74 support for compressed archives in <span class="application">pg_dump</span> and75 <span class="application">pg_restore</span>.76 </p></li><li class="listitem"><p>77 The ICU library is used by default. If you don't want to use it then you must specify the <code class="option">--without-icu</code> option to <code class="filename">configure</code>. Using this option disables support for ICU collation features (see <a class="xref" href="collation.html" title="24.2. Collation Support">Section 24.2</a>).78 </p><p>79 ICU support requires the <span class="productname">ICU4C</span> package to be80 installed. The minimum required version of81 <span class="productname">ICU4C</span> is currently 4.2.82 </p><p>83 By default,84 <span class="productname">pkg-config</span><a id="id-1.6.4.5.3.2.7.3.2" class="indexterm"></a>85 will be used to find the required compilation options. This is86 supported for <span class="productname">ICU4C</span> version 4.6 and later.87 For older versions, or if <span class="productname">pkg-config</span> is not88 available, the variables <code class="envar">ICU_CFLAGS</code> and89 <code class="envar">ICU_LIBS</code> can be specified to90 <code class="filename">configure</code>, like in this example:91</p><pre class="programlisting">92./configure ... ICU_CFLAGS='-I/some/where/include' ICU_LIBS='-L/some/where/lib -licui18n -licuuc -licudata'93</pre><p>94 (If <span class="productname">ICU4C</span> is in the default search path95 for the compiler, then you still need to specify nonempty strings in96 order to avoid use of <span class="productname">pkg-config</span>, for97 example, <code class="literal">ICU_CFLAGS=' '</code>.)98 </p></li></ul></div><p>99 </p><p>100 The following packages are optional. They are not required in the101 default configuration, but they are needed when certain build102 options are enabled, as explained below:103 104 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>105 To build the server programming language106 <span class="application">PL/Perl</span> you need a full107 <span class="productname">Perl</span> installation, including the108 <code class="filename">libperl</code> library and the header files.109 The minimum required version is <span class="productname">Perl</span> 5.14.110 Since <span class="application">PL/Perl</span> will be a shared111 library, the <a id="id-1.6.4.5.4.1.1.1.6" class="indexterm"></a>112 <code class="filename">libperl</code> library must be a shared library113 also on most platforms. This appears to be the default in114 recent <span class="productname">Perl</span> versions, but it was not115 in earlier versions, and in any case it is the choice of whomever116 installed Perl at your site. <code class="filename">configure</code> will fail117 if building <span class="application">PL/Perl</span> is selected but it cannot118 find a shared <code class="filename">libperl</code>. In that case, you will have119 to rebuild and install <span class="productname">Perl</span> manually to be120 able to build <span class="application">PL/Perl</span>. During the121 configuration process for <span class="productname">Perl</span>, request a122 shared library.123 </p><p>124 If you intend to make more than incidental use of125 <span class="application">PL/Perl</span>, you should ensure that the126 <span class="productname">Perl</span> installation was built with the127 <code class="literal">usemultiplicity</code> option enabled (<code class="literal">perl -V</code>128 will show whether this is the case).129 </p></li><li class="listitem"><p>130 To build the <span class="application">PL/Python</span> server programming131 language, you need a <span class="productname">Python</span>132 installation with the header files and133 the <span class="application">sysconfig</span> module. The minimum134 required version is <span class="productname">Python</span> 3.2.135 </p><p>136 Since <span class="application">PL/Python</span> will be a shared137 library, the <a id="id-1.6.4.5.4.1.2.2.2" class="indexterm"></a>138 <code class="filename">libpython</code> library must be a shared library139 also on most platforms. This is not the case in a default140 <span class="productname">Python</span> installation built from source, but a141 shared library is available in many operating system142 distributions. <code class="filename">configure</code> will fail if143 building <span class="application">PL/Python</span> is selected but it cannot144 find a shared <code class="filename">libpython</code>. That might mean that you145 either have to install additional packages or rebuild (part of) your146 <span class="productname">Python</span> installation to provide this shared147 library. When building from source, run <span class="productname">Python</span>'s148 configure with the <code class="literal">--enable-shared</code> flag.149 </p></li><li class="listitem"><p>150 To build the <span class="application">PL/Tcl</span>151 procedural language, you of course need a <span class="productname">Tcl</span>152 installation. The minimum required version is153 <span class="productname">Tcl</span> 8.4.154 </p></li><li class="listitem"><p>155 To enable Native Language Support (<acronym class="acronym">NLS</acronym>), that156 is, the ability to display a program's messages in a language157 other than English, you need an implementation of the158 <span class="application">Gettext</span> <acronym class="acronym">API</acronym>. Some operating159 systems have this built-in (e.g., <span class="systemitem">Linux</span>, <span class="systemitem">NetBSD</span>,160 <span class="systemitem">Solaris</span>), for other systems you161 can download an add-on package from <a class="ulink" href="https://www.gnu.org/software/gettext/" target="_top">https://www.gnu.org/software/gettext/</a>.162 If you are using the <span class="application">Gettext</span> implementation in163 the <acronym class="acronym">GNU</acronym> C library, then you will additionally164 need the <span class="productname">GNU Gettext</span> package for some165 utility programs. For any of the other implementations you will166 not need it.167 </p></li><li class="listitem"><p>168 You need <span class="productname">OpenSSL</span>, if you want to support169 encrypted client connections. <span class="productname">OpenSSL</span> is170 also required for random number generation on platforms that do not171 have <code class="filename">/dev/urandom</code> (except Windows). The minimum172 required version is 1.0.1.173 </p></li><li class="listitem"><p>174 You need <span class="application">MIT Kerberos</span> (for GSSAPI),175 <span class="productname">OpenLDAP</span>, and/or <span class="application">PAM</span>,176 if you want to support authentication using those services.177 </p></li><li class="listitem"><p>178 You need <span class="productname">LZ4</span>, if you want to support179 compression of data with that method; see180 <a class="xref" href="runtime-config-client.html#GUC-DEFAULT-TOAST-COMPRESSION">default_toast_compression</a> and181 <a class="xref" href="runtime-config-wal.html#GUC-WAL-COMPRESSION">wal_compression</a>.182 </p></li><li class="listitem"><p>183 You need <span class="productname">Zstandard</span>, if you want to support184 compression of data with that method; see185 <a class="xref" href="runtime-config-wal.html#GUC-WAL-COMPRESSION">wal_compression</a>.186 The minimum required version is 1.4.0.187 </p></li><li class="listitem"><p>188 To build the <span class="productname">PostgreSQL</span> documentation,189 there is a separate set of requirements; see190 <a class="xref" href="docguide-toolsets.html" title="J.2. Tool Sets">Section J.2</a>.191 </p></li></ul></div><p>192 </p><p>193 If you are building from a <span class="productname">Git</span> tree instead of194 using a released source package, or if you want to do server development,195 you also need the following packages:196 197 </p><div class="itemizedlist"><ul class="itemizedlist" style="list-style-type: disc; "><li class="listitem"><p>198 <a id="id-1.6.4.5.5.2.1.1.1" class="indexterm"></a>199 <a id="id-1.6.4.5.5.2.1.1.2" class="indexterm"></a>200 <a id="id-1.6.4.5.5.2.1.1.3" class="indexterm"></a>201 <a id="id-1.6.4.5.5.2.1.1.4" class="indexterm"></a>202 203 <span class="application">Flex</span> and <span class="application">Bison</span>204 are needed to build from a Git checkout, or if you changed the actual205 scanner and parser definition files. If you need them, be sure206 to get <span class="application">Flex</span> 2.5.35 or later and207 <span class="application">Bison</span> 2.3 or later. Other <span class="application">lex</span>208 and <span class="application">yacc</span> programs cannot be used.209 </p></li><li class="listitem"><p>210 <a id="id-1.6.4.5.5.2.2.1.1" class="indexterm"></a>211 212 <span class="application">Perl</span> 5.14 or later is needed to build from a Git checkout,213 or if you changed the input files for any of the build steps that214 use Perl scripts. If building on Windows you will need215 <span class="application">Perl</span> in any case. <span class="application">Perl</span> is216 also required to run some test suites.217 </p></li></ul></div><p>218 </p><p>219 If you need to get a <acronym class="acronym">GNU</acronym> package, you can find220 it at your local <acronym class="acronym">GNU</acronym> mirror site (see <a class="ulink" href="https://www.gnu.org/prep/ftp" target="_top">https://www.gnu.org/prep/ftp</a>221 for a list) or at <a class="ulink" href="ftp://ftp.gnu.org/gnu/" target="_top">ftp://ftp.gnu.org/gnu/</a>.222 </p></div><div class="navfooter"><hr /><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="installation.html" title="Chapter 17. Installation from Source Code">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="installation.html" title="Chapter 17. Installation from Source Code">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="install-getsource.html" title="17.2. Getting the Source">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 17. Installation from Source Code </td><td width="20%" align="center"><a accesskey="h" href="index.html" title="PostgreSQL 16.3 Documentation">Home</a></td><td width="40%" align="right" valign="top"> 17.2. Getting the Source</td></tr></table></div></body></html>