【问题标题】:initdb error on PostgreSQL 10 - RHEL 6PostgreSQL 10 上的 initdb 错误 - RHEL 6
【发布时间】:2017-10-12 18:53:10
【问题描述】:

通过运行以下命令在 RHEL 6 系统上安装 PostgreSQL 10:

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.

有人可以帮忙解决这个问题吗?

谢谢。

更新:

跑: 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

谁能告诉我如何解决依赖问题?

【问题讨论】:

    标签: linux database rhel6 postgresql-initdb postgresql-10


    【解决方案1】:

    rpm不会自动解决依赖问题,需要自己安装依赖包。例如, 试试

    yum install libicu-devel
    

    或其他等效步骤。

    【讨论】:

    • 我的 RHEL 系统没有注册到 Red Hat Subscription Management。我需要将它安装在一些无法连接到互联网的系统上。除了YUM安装还有其他方法吗?
    • 您可以下载 rpm 包并安装它们,查看类似 pkgs.org/download/libicu-devel 的网站。或者您可以尝试下载源代码并自己编译它,但它会花费更多时间。 CentOS 软件库也可以使用 RHEL,但是由于您的目标系统没有互联网,所以您只能手动安装它们。
    猜你喜欢
    • 2013-09-06
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-09
    • 1970-01-01
    • 2022-10-05
    • 2018-04-04
    相关资源
    最近更新 更多