centos7編譯安裝PostgreSQL報(bào)錯(cuò):configure error readline library not found
centos7編譯安裝PostgreSQL報(bào)錯(cuò):configure error readline library not found
問題:
在通過源碼包安裝 PostgreSQL 時(shí),首先需要執(zhí)行 ./configure
該腳本將運(yùn)行一些測試來決定一些系統(tǒng)相關(guān)的變量, 并檢測你的操作系統(tǒng)的特殊設(shè)置,并且最后將在編譯樹中創(chuàng)建一些文件以記錄它找到了什么。
如果執(zhí)行的過程中報(bào)如下錯(cuò)誤:
configure: error: readline library not found
解決方案:
安裝失敗時(shí)會(huì)提示執(zhí)行 ./configure 加上 --without-readline 選項(xiàng),不編譯 readline:
If you have readline already installed, see config.log for details on the
failure. It is possible the compiler isn't looking in the proper directory.
Use --without-readline to disable readline support.
但是不建議這樣做,readline 的作用是能夠在 pg 控制臺(tái)讀取歷史命令,就像在 linux shell 中按上下鍵讀取歷史命令,不需要再手動(dòng)輸入重復(fù)的命令
可安裝如下依賴解決該問題:
yum install -y readline-devel
會(huì)員登錄
賬號(hào)登錄還沒有賬號(hào)?立即注冊