Software⏱️ 3 min read📅 2026-06-15

How to Fix: ERROR: could not load library "/usr/lib64/pgsql/hstore.so": /lib64/libc.so.6: version `GLIBC_2.14' not found

PostgreSQL hstore module error fix for Amazon Linux AMI.

Quick Answer: Recompile PostgreSQL against the correct glibc version or upgrade to a newer version of Amazon Linux AMI.

The ERROR: could not load library '/usr/lib64/pgsql/hstore.so': /lib64/libc.so.6: version 'GLIBC_2.14' not found error affects PostgreSQL databases running on Amazon Linux AMI. This error occurs when the PostgreSQL database is unable to find a compatible version of the GLIBC (GNU C Library) library, which is required by the hstore extension.

This issue can be frustrating because it requires a good understanding of the dependencies and versions involved in PostgreSQL. However, with the right steps, you should be able to resolve this error and enable the hstore extension on your database.

💡 Why You Are Getting This Error

  • The primary reason for this error is that the PostgreSQL database is trying to use an older version of GLIBC (GLIBC_2.14) that is not available in the Amazon Linux AMI. This can happen when the system's package manager is unable to update or install the necessary dependencies.
  • Another possible cause is a misconfiguration of the system's libraries or dependencies, which can cause PostgreSQL to try to use an incompatible version of GLIBC.

🔧 Proven Troubleshooting Steps

Reconfiguring the system's GLIBC library

  1. Step 1: Step 1: Check if the system is using the correct version of GLIBC. Run the command 'readlink -f /lib/libc.so.6' to get the actual path of the libc.so.6 file.
  2. Step 2: Step 2: If the actual path is different from what you expect, update the system's GLIBC library to a compatible version. You can do this by running the command 'yum install glibc-common' or 'dnf install glibc-common'.
  3. Step 3: Step 3: After updating the GLIBC library, restart the PostgreSQL service to ensure that the changes take effect.

Recompiling PostgreSQL against a compatible version of GLIBC

  1. Step 1: Step 1: Identify which PostgreSQL packages need to be recompiled. You can use the 'ldd' command to check which libraries are being used by PostgreSQL. Look for the line that starts with '/lib64/libc.so.6'.
  2. Step 2: Step 2: Use a tool like 'yum-builddep' or 'dnf builddep' to rebuild the necessary packages, including those that depend on GLIBC. This will download and install all the required dependencies.

✨ Wrapping Up

To resolve the ERROR: could not load library '/usr/lib64/pgsql/hstore.so': /lib64/libc.so.6: version 'GLIBC_2.14' not found error, you can try reconfiguring the system's GLIBC library or recompiling PostgreSQL against a compatible version of GLIBC. By following these steps, you should be able to enable the hstore extension on your PostgreSQL database and resolve this issue.

Did this fix your problem?

If not, try searching for specific error codes.

🔍 Search Error Database

❓ Frequently Asked Questions