CentOS / RHEL: Install PostgresSQL Interface for Perl (perl-DBD-Pg)

How do I install PostgresSQL interface for perl for programming purpose under Redhat / RHEL / Fedora / CentOS Linux?

perl-DBD-Pg is an implementation of DBI (a database interface for Perl) for PostgreSQL for Perl. This packages allow you to access database environments in a standard way. The system implements each supported database environment as a DBD driver, in much the same way that hardware devices from multiple vendors can operate with different CPU platforms. You can install it as follows using the yum command:
# yum install perl-DBD-Pg
Sample outputs:

Loaded plugins: rhnplugin, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package perl-DBD-Pg.x86_64 0:1.49-2.el5_3.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

 Package         Arch       Version              Repository                Size
 perl-DBD-Pg     x86_64     1.49-2.el5_3.1       rhel-x86_64-server-5     115 k

Transaction Summary
Install       1 Package(s)
Upgrade       0 Package(s)

Total download size: 115 k
Is this ok [y/N]: y
Downloading Packages:
perl-DBD-Pg-1.49-2.el5_3.1.x86_64.rpm                    | 115 kB     00:00     
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing     : perl-DBD-Pg                                              1/1 

  perl-DBD-Pg.x86_64 0:1.49-2.el5_3.1                                           


🐧 Get the latest tutorials on Linux, Open Source & DevOps via RSS feed or Weekly email newsletter.

🐧 1 comment so far... add one

CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04
1 comment… add one
  • David Nickerson Jul 22, 2014 @ 17:45

    On CentOS6 I get this:
    No package perl-DBD-Pg available.
    I found an rpm for CentOS6 and ran:
    yum install perl-DBD-Pg-2.15.1-4.el6_3.x86_64.rpm
    and got:
    Error: Package: perl-DBD-Pg-2.15.1-4.el6_3.x86_64 (/perl-DBD-Pg-2.15.1-4.el6_3.x86_64)
    Requires: libpq.so.5()(64bit)
    I have libpq.so.5 in my postgres install dir. Tried adding that dir to LD_LIBRARY_PATH and PATH and no luck.

    Any Ideas?

Leave a Reply

Your email address will not be published.

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @ webmaster@cyberciti.biz