P_Ar
P_Ar

Reputation: 439

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.

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?

Upvotes: 1

Views: 2806

Answers (1)

peter__barnes
peter__barnes

Reputation: 351

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.

Upvotes: 2

Related Questions