通过运行以下命令在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
有人可以告诉我如何解决依赖问题吗?
答案 0 :(得分:2)
rpm不会自动解决依赖问题,您需要自己安装依赖包。例如, 尝试
yum install libicu-devel
或其他等效步骤。