How To Install libpq on Fedora 34

libpq is PostgreSQL client library PostgreSQL client library

Introduction

In this tutorial we learn how to install libpq on Fedora 34.

What is libpq

The libpq package provides the essential shared library for any PostgreSQL client program or interface. You will need to install this package to use any other PostgreSQL package or any clients that need to connect to a PostgreSQL server. libpq 13.3 1.fc34 x86_64 202 k libpq-13.3-1.fc34.src.rpm updates PostgreSQL client library http PostgreSQL The libpq package provides the essential shared library for any PostgreSQL client program or interface. You will need to install this package to use any other PostgreSQL package or any clients that need to connect to a PostgreSQL server.

We can use yum or dnf to install libpq on Fedora 34. In this tutorial we discuss both methods but you only need to choose one of method to install libpq.

Install libpq on Fedora 34 Using dnf

Update yum database with dnf using the following command.

sudo dnf makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install libpq using dnf by running the following command:

sudo dnf -y install libpq

Install libpq on Fedora 34 Using yum

Update yum database with yum using the following command.

sudo yum makecache --refresh

The output should look something like this:

Fedora 34 - x86_64                               20 kB/s | 6.6 kB     00:00
Fedora 34 openh264 (From Cisco) - x86_64        1.4 kB/s | 989  B     00:00
Fedora Modular 34 - x86_64                       68 kB/s | 6.5 kB     00:00
Fedora 34 - x86_64 - Updates                    3.5 kB/s | 6.2 kB     00:01
Fedora Modular 34 - x86_64 - Updates             17 kB/s | 5.9 kB     00:00
Metadata cache created.

After updating yum database, We can install libpq using yum by running the following command:

sudo yum -y install libpq

How To Uninstall libpq on Fedora 34

To uninstall only the libpq package we can use the following command:

sudo dnf remove libpq

libpq Package Contents on Fedora 34

/usr/lib/.build-id
/usr/lib/.build-id/04
/usr/lib/.build-id/04/fd8d9ed135084779cba3e57eb6fbf869d80605
/usr/lib64/libpq.so.5
/usr/lib64/libpq.so.5.13
/usr/share/licenses/libpq
/usr/share/licenses/libpq/COPYRIGHT
/usr/share/locale/cs/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/de/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/es/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/fr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/it/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ja/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ko/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ru/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/sv/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/tr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/uk/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/zh_CN/LC_MESSAGES/libpq5-13.mo
/usr/share/pgsql
/usr/share/pgsql/pg_service.conf.sample
/usr/lib/.build-id
/usr/lib/.build-id/10
/usr/lib/.build-id/10/86ca69e14cee95f9c7adf4f26bbaac7fb3160d
/usr/lib/libpq.so.5
/usr/lib/libpq.so.5.13
/usr/share/licenses/libpq
/usr/share/licenses/libpq/COPYRIGHT
/usr/share/locale/cs/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/de/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/es/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/fr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/it/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ja/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ko/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ru/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/sv/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/tr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/uk/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/zh_CN/LC_MESSAGES/libpq5-13.mo
/usr/share/pgsql
/usr/share/pgsql/pg_service.conf.sample
/usr/lib/.build-id
/usr/lib/.build-id/19
/usr/lib/.build-id/19/e32df1654822f89b404755a6a996a4962ad4e0
/usr/lib/libpq.so.5
/usr/lib/libpq.so.5.13
/usr/share/licenses/libpq
/usr/share/licenses/libpq/COPYRIGHT
/usr/share/locale/cs/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/de/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/es/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/fr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/it/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ja/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ko/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ru/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/sv/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/tr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/uk/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/zh_CN/LC_MESSAGES/libpq5-13.mo
/usr/share/pgsql
/usr/share/pgsql/pg_service.conf.sample
/usr/lib/.build-id
/usr/lib/.build-id/86
/usr/lib/.build-id/86/58909042442093a500ea3c37df770d6564ff98
/usr/lib64/libpq.so.5
/usr/lib64/libpq.so.5.13
/usr/share/licenses/libpq
/usr/share/licenses/libpq/COPYRIGHT
/usr/share/locale/cs/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/de/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/es/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/fr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/it/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ja/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ko/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/ru/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/sv/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/tr/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/uk/LC_MESSAGES/libpq5-13.mo
/usr/share/locale/zh_CN/LC_MESSAGES/libpq5-13.mo
/usr/share/pgsql
/usr/share/pgsql/pg_service.conf.sample

References

Summary

In this tutorial we learn how to install libpq on Fedora 34 using yum and dnf.