2017-10-12 116 views
-1

通過運行下面的命令上RHEL 6系統安裝的PostgreSQL 10:上的PostgreSQL 10 initdb的錯誤 - RHEL 6

rpm -Uvh --force --nodeps postgresql10-libs-10.0-1PGDG.rhel6.x86_64.rpm 
rpm -Uvh --force --nodeps postgresql10-10.0-1PGDG.rhel6.x86_64.rpm 
rpm -Uvh --force --nodeps postgresql10-server-10.0-1PGDG.rhel6.x86_64.rpm 
rpm -Uvh --force --nodeps postgresql10-contrib-10.0-1PGDG.rhel6.x86_64.rpm 

的試圖運行在initdb:

cd /usr/pgsql-10/bin

./initdb --locale=C --encoding=UTF-8 -D /opt/postgresql -U postgres

收到以下錯誤: /usr/pgsql-10/bin/postgres: error while loading shared libraries: libicui18n.so.42: cannot open shared object file: No such file or directory no data was returned by command ""/usr/pgsql-10/bin/postgres" -V" The program "postgres" is needed by initdb but was not found in the same directory as "/usr/pgsql-10/bin/initdb". Check your installation.

有人可以幫助解決這個問題嗎?

謝謝。

UPDATE:

冉: rpm -Uvh --force postgresql10-10.0-1PGDG.rhel6.x86_64.rpm

得到了以下錯誤:

error: Failed dependencies: libicu is needed by postgresql10-10.0-1PGDG.rhel6.x86_64

有人能告訴我如何解決依賴問題?

回答

0

轉不解決問題的依賴全自動,你需要安裝相關的包yourself.For例如, 嘗試

yum install libicu-devel 

或其他等效的步驟。

+0

我的RHEL系統沒有註冊到紅帽訂閱管理。我需要將它安裝在一些不會連接到互聯網的系統上。除YUM安裝以外是否還有其他方法? –

+0

你可以下載rpm包並安裝它們,查看網站如https://pkgs.org/download/libicu-devel。或者您可以嘗試下載源代碼並自行編譯,但花費更多時間。 CentOS版本庫也可以與RHEL協同工作,但是導致你的目標系統沒有互聯網,所以你只能手動安裝它們。 –

+0

謝謝你的幫助 –