gpt4 book ai didi

linux - PostgreSQL 10 上的 initdb 错误 - RHEL 6

转载 作者:搜寻专家 更新时间:2023-10-30 22:29:31 25 4
gpt4 key购买 nike

通过运行以下命令在 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:加载共享库时出错:libicui18n.so.42:无法打开共享对象文件:没有这样的文件或目录
命令“”/usr/pgsql-10/bin/postgres”-V”没有返回数据
initdb 需要程序“postgres”,但在
与“/usr/pgsql-10/bin/initdb”相同的目录。
检查您的安装。

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

谢谢。

更新:

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

出现以下错误:

错误:依赖项失败:
postgresql10-10.0-1PGDG.rhel6.x86_64需要libicu

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

最佳答案

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

yum install libicu-devel

或其他等效步骤。

关于linux - PostgreSQL 10 上的 initdb 错误 - RHEL 6,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46716935/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com