简体   繁体   中英

initdb error on PostgreSQL 10 - RHEL 6

Installed PostgreSQL 10 on RHEL 6 system by running the following commands:

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

The tried to run initdb:

cd /usr/pgsql-10/bin

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

Getting the following error: /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. /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.

Can someone pls help resolve this issue?

Thanks.

UPDATE:

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

got the following error:

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

Can someone please tell me how to resolve the dependency issue?

rpm do not resolve dependence problem automaticly, you need to install dependent package yourself.For example, try

yum install libicu-devel

or other equivalent steps.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM