"readline library not found" Displayed After the configure Command Is Run During PostgreSQL Compilation
Symptom
During PostgreSQL compilation, the message "configure: error: readline library not found" is displayed after the configure command is executed.

Key Process and Cause Analysis
The system lacks the readline dynamic library.
Conclusion and Solution
- Solution 1: (Recommended) Install readline-related dependencies.
- Check whether readline has been installed in the system.
rpm -qa | grep readline
- Search for readline-related packages.
yum search readline
- Install the readline-devel dependency package.
yum -y install -y readline-devel
- Check whether readline-devel is successfully installed.
rpm -qa | grep readline
- Return to the PostgreSQL compilation path and run the configure command again.
./configure
- Check whether readline has been installed in the system.
- Solution 2: Add the --without-readline parameter when running the configure command.
readline is used to read user input in the command line. When you use this method for command line editing, it reads a line of text you entered in the command line and stores it in a variable. You can perform operations on the variable, such as printing and modifying the variable. After you complete the operation on the variable, new information cannot be entered in the command line. This solution is not recommended.
./congfigure --without-readline
Parent topic: PostgreSQL