2017-10-12 115 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

谢谢你的帮助 –