1

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?

P_Ar
  • 377
  • 2
  • 9
  • 25

1 Answers1

2

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.

peter__barnes
  • 351
  • 2
  • 5
  • My RHEL system is not registered to Red Hat Subscription Management. I need to install it on some of the systems which wont be connected to the internet. Is there any other way except for YUM install? – P_Ar Oct 13 '17 at 14:27
  • you can download rpm package and install them, check website like this https://pkgs.org/download/libicu-devel . Or you can try to download source code and compile it by yourself,but it cost much more time. CentOS repositories can also work with RHEL,but cause your target system has no internet, so , you can only install them manually. – peter__barnes Oct 14 '17 at 00:56