On a Debian-based system, install the following packages:

<notextile>
<pre><code>~$ <span class="userinput">sudo apt-get install libpq-dev postgresql</span>
</code></pre>
</notextile>

On a Red Hat-based system, install the following packages:

<notextile>
<pre><code>~$ <span class="userinput">sudo yum install postgresql postgresql-devel</span>
</code></pre>
</notextile>

{% include 'notebox_begin' %}

If you intend to use specific versions of these packages from Software Collections, you may have to adapt some of the package names to match. For example:

<notextile>
<pre><code>~$ <span class="userinput">sudo yum install postgresql92 postgresql92-postgresql-devel</span></code></pre></notextile>

{% include 'notebox_end' %}