centos7.9安装postgresql15报错

安装postgresql15的命令为:

yum install -y https://download.postgresql.org/pub/repos/yum/reporpms/EL-7-x86_64/pgdg-redhat-repo-latest.noarch.rpm
yum install -y postgresql15-server postgresql15-devel

中途报错退出,报错信息为:

Resolving Dependencies
--> Running transaction check
---> Package postgresql15-devel.x86_64 0:15.1-1PGDG.rhel7 will be installed
--> Processing Dependency: postgresql15-libs(x86-64) = 15.1-1PGDG.rhel7 for package: postgresql15-devel-15.1-1PGDG.rhel7.x86_64
--> Processing Dependency: postgresql15(x86-64) = 15.1-1PGDG.rhel7 for package: postgresql15-devel-15.1-1PGDG.rhel7.x86_64
--> Processing Dependency: llvm5.0-devel >= 5.0 for package: postgresql15-devel-15.1-1PGDG.rhel7.x86_64
--> Processing Dependency: llvm-toolset-7-clang >= 4.0.1 for package: postgresql15-devel-15.1-1PGDG.rhel7.x86_64
---> Package postgresql15-server.x86_64 0:15.1-1PGDG.rhel7 will be installed
--> Processing Dependency: libzstd.so.1()(64bit) for package: postgresql15-server-15.1-1PGDG.rhel7.x86_64
--> Running transaction check
---> Package postgresql15.x86_64 0:15.1-1PGDG.rhel7 will be installed
--> Processing Dependency: libzstd >= 1.4.0 for package: postgresql15-15.1-1PGDG.rhel7.x86_64
--> Processing Dependency: libzstd.so.1()(64bit) for package: postgresql15-15.1-1PGDG.rhel7.x86_64
---> Package postgresql15-devel.x86_64 0:15.1-1PGDG.rhel7 will be installed
--> Processing Dependency: llvm5.0-devel >= 5.0 for package: postgresql15-devel-15.1-1PGDG.rhel7.x86_64
--> Processing Dependency: llvm-toolset-7-clang >= 4.0.1 for package: postgresql15-devel-15.1-1PGDG.rhel7.x86_64
---> Package postgresql15-libs.x86_64 0:15.1-1PGDG.rhel7 will be installed
---> Package postgresql15-server.x86_64 0:15.1-1PGDG.rhel7 will be installed
--> Processing Dependency: libzstd.so.1()(64bit) for package: postgresql15-server-15.1-1PGDG.rhel7.x86_64
--> Finished Dependency Resolution
Error: Package: postgresql15-server-15.1-1PGDG.rhel7.x86_64 (pgdg15)
           Requires: libzstd.so.1()(64bit)
Error: Package: postgresql15-15.1-1PGDG.rhel7.x86_64 (pgdg15)
           Requires: libzstd.so.1()(64bit)
Error: Package: postgresql15-15.1-1PGDG.rhel7.x86_64 (pgdg15)
           Requires: libzstd >= 1.4.0
Error: Package: postgresql15-devel-15.1-1PGDG.rhel7.x86_64 (pgdg15)
           Requires: llvm5.0-devel >= 5.0
Error: Package: postgresql15-devel-15.1-1PGDG.rhel7.x86_64 (pgdg15)
           Requires: llvm-toolset-7-clang >= 4.0.1
 You could try using --skip-broken to work around the problem
 You could try running: rpm -Va --nofiles --nodigest

解决方法:

wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/libzstd-1.5.5-1.el7.x86_64.rpm
wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/llvm5.0-devel-5.0.1-7.el7.x86_64.rpm
wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/llvm5.0-5.0.1-7.el7.x86_64.rpm
wget https://dl.fedoraproject.org/pub/epel/7/x86_64/Packages/l/llvm5.0-libs-5.0.1-7.el7.x86_64.rpm


yum install -y ./libzstd-1.5.5-1.el7.x86_64.rpm
yum install -y centos-release-scl-rh llvm5*

重新安装postgresql15:

yum install postgresql15-server postgresql15-devel
postgresql-15-setup  initdb
systemctl enable postgresql-15
systemctl start postgresql-15

你可能感兴趣的:(Linux开发,linux,运维,服务器)