问题小计:Requires: libarmadillo.so.8()(64bit)
目录
问题小计:Requires: libarmadillo.so.8()(64bit)
场景说明
我打算在pg10库中安装postgis插件:
下载10版本rpm的noarch包,并安装:
[root@plat-ecloud01-andfleethe-prd-postgres04 ~]# wget https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
--2019-01-04 18:03:08-- https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm
Resolving download.postgresql.org (download.postgresql.org)... 204.145.124.244, 217.196.149.55, 72.32.157.246, ...
Connecting to download.postgresql.org (download.postgresql.org)|204.145.124.244|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 4688 (4.6K) [application/x-redhat-package-manager]
Saving to: ‘pgdg-centos10-10-2.noarch.rpm’
100%[===================================================================================================================================>] 4,688 --.-K/s in 0.02s
2019-01-04 18:03:09 (196 KB/s) - ‘pgdg-centos10-10-2.noarch.rpm’ saved [4688/4688]
[root@plat-ecloud01-andfleethe-prd-postgres04 ~]# rpm -ivh pgdg-centos10-10-2.noarch.rpm
Preparing... ################################# [100%]
Updating / installing...
1:pgdg-centos10-10-2 ################################# [100%]
安装postgis报错:
[root@plat-ecloud01-andfleethe-prd-postgres04 ~]# yum install postgis
Error: Package: gdal-libs-1.11.4-12.rhel7.x86_64 (pgdg10)
Requires: libarmadillo.so.8()(64bit)
Error: Package: gdal-1.11.4-12.rhel7.x86_64 (pgdg10)
Requires: libarmadillo.so.8()(64bit)
You could try using --skip-broken to work around the problem
You could try running: rpm -Va --nofiles --nodigest
问题梳理
安装epel-release包:
yum install epel-release
再安装postgis,安装成功:
[root@plat-ecloud01-andfleethe-prd-postgres04 ~]# yum install postgis
Installed:
postgis.x86_64 0:2.0.7-1.el7
Dependency Installed:
CharLS.x86_64 0:1.0-5.el7 SuperLU.x86_64 0:5.2.0-5.el7 armadillo.x86_64 0:8.300.0-1.el7 arpack.x86_64 0:3.1.3-2.el7
atlas.x86_64 0:3.10.1-10.el7 blas.x86_64 0:3.4.2-5.el7 cfitsio.x86_64 0:3.370-10.el7 freexl.x86_64 0:1.0.5-1.el7
gdal.x86_64 0:1.11.4-12.rhel7 gdal-libs.x86_64 0:1.11.4-12.rhel7 geos.x86_64 0:3.4.2-2.el7 gpsbabel.x86_64 0:1.5.0-2.el7
hdf5.x86_64 0:1.8.12-10.el7 jasper-libs.x86_64 0:1.900.1-29.el7 lapack.x86_64 0:3.4.2-5.el7 lcms2.x86_64 0:2.6-3.el7
libaec.x86_64 0:1.0.2-1.el7 libdap.x86_64 0:3.13.1-2.el7 libgeotiff.x86_64 0:1.4.0-1.rhel7 libgfortran.x86_64 0:4.8.5-11.el7
libgta.x86_64 0:1.0.4-1.el7 libquadmath.x86_64 0:4.8.5-11.el7 libusb.x86_64 1:0.1.4-3.el7 libusbx.x86_64 0:1.0.20-1.el7
netcdf.x86_64 0:4.3.3.1-5.el7 ogdi.x86_64 0:3.2.0-4.rhel7 openblas-openmp.x86_64 0:0.3.3-2.el7 openjpeg-libs.x86_64 0:1.5.1-16.el7_3
openjpeg2.x86_64 0:2.3.0-6.el7 poppler.x86_64 0:0.26.5-16.el7 poppler-data.noarch 0:0.4.6-3.el7 proj.x86_64 0:4.8.0-4.el7
proj49.x86_64 0:4.9.3-3.rhel7 qt.x86_64 1:4.8.5-13.el7 qt-settings.noarch 0:19-23.5.el7.centos shapelib.x86_64 0:1.3.0-2.el7
unixODBC.x86_64 0:2.3.1-11.el7 xerces-c.x86_64 0:3.1.1-8.el7_2
Complete!
再登陆postgresql,添加拓展包发现在指定路径没有postgis.control文件:
[root@plat-ecloud01-andfleethe-prd-postgres04 ~]# /usr/pgsql-10/bin/psql -U postgres -p 9999 -h 10.176.21.39
Password for user postgres:
psql (10.4)
Type "help" for help.
postgres=# create extension postgis;
ERROR: could not open extension control file "/usr/pgsql-10/share/extension/postgis.control": No such file or directory
经查询发现这个版本的postgis默认的安装路径是/usr/share/pgsql/extension,这是老版本pg库的拓展包路径。。:
[root@plat-ecloud01-andfleethe-prd-postgres04 postgis]# find / -name postgis*
/usr/lib64/pgsql/postgis-2.0.so
/usr/share/doc/postgis-2.0.7
/usr/share/doc/postgis-2.0.7/postgis.xml
/usr/share/pgsql/extension/postgis_topology--2.0.1--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--2.0.0rc2--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology.control
/usr/share/pgsql/extension/postgis_topology--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--2.0.4--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.5--2.0.7.sql
/usr/share/pgsql/extension/postgis.control
/usr/share/pgsql/extension/postgis--2.0.0rc2--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.2--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--2.0.0rc1--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--2.0.2--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.3--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.0--2.0.7.sql
/usr/share/pgsql/extension/postgis--unpackaged--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--2.0.0--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--2.0.0beta4--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--2.0.6--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--2.0.3--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.1--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.0rc1--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.4--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--unpackaged--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.0beta4--2.0.7.sql
/usr/share/pgsql/extension/postgis--2.0.6--2.0.7.sql
/usr/share/pgsql/extension/postgis_topology--2.0.5--2.0.7.sql
/usr/share/pgsql/contrib/postgis-2.0
/usr/share/pgsql/contrib/postgis-2.0/postgis_restore.pl
/usr/share/pgsql/contrib/postgis-2.0/postgis_comments.sql
/usr/share/pgsql/contrib/postgis-2.0/postgis_upgrade_20_minor.sql
/usr/share/pgsql/contrib/postgis-64.sql
/usr/share/postgis
问题解决
查postgis官网后发现新版的postgis命名方式都是如:postgis24,而我使用的pg10.4版本对应的postgis是2.4版本:
[root@plat-ecloud01-andfleethe-prd-postgres04 postgis]# yum install postgis24_10
Installed:
postgis24_10.x86_64 0:2.4.6-3.rhel7
Dependency Installed:
CGAL.x86_64 0:4.7-1.rhel7 SFCGAL.x86_64 0:1.2.2-1.rhel7 SFCGAL-libs.x86_64 0:1.2.2-1.rhel7 atk.x86_64 0:2.14.0-1.el7
boost-date-time.x86_64 0:1.53.0-26.el7 boost-serialization.x86_64 0:1.53.0-26.el7 cairo.x86_64 0:1.14.2-1.el7 gdk-pixbuf2.x86_64 0:2.31.6-3.el7
geos37.x86_64 0:3.7.0-1.rhel7 graphite2.x86_64 0:1.3.6-1.el7_2 gtk2.x86_64 0:2.24.28-8.el7 harfbuzz.x86_64 0:0.9.36-1.el7
hicolor-icon-theme.noarch 0:0.12-7.el7 libXcursor.x86_64 0:1.1.14-2.1.el7 libXdamage.x86_64 0:1.1.4-4.1.el7 libXfixes.x86_64 0:5.0.1-2.1.el7
libXft.x86_64 0:2.3.2-2.el7 libXinerama.x86_64 0:1.1.3-2.1.el7 libXrandr.x86_64 0:1.4.2-2.el7 libXxf86vm.x86_64 0:1.1.3-2.1.el7
libthai.x86_64 0:0.1.14-9.el7 libxshmfence.x86_64 0:1.2-1.el7 mesa-libEGL.x86_64 0:11.2.2-2.20160614.el7 mesa-libGL.x86_64 0:11.2.2-2.20160614.el7
mesa-libGLU.x86_64 0:9.0.0-4.el7 mesa-libgbm.x86_64 0:11.2.2-2.20160614.el7 mesa-libglapi.x86_64 0:11.2.2-2.20160614.el7 pango.x86_64 0:1.36.8-2.el7
pixman.x86_64 0:0.34.0-1.el7
Complete!
检查文件是否存在:
[root@plat-ecloud01-andfleethe-prd-postgres04 extension]# ls /usr/pgsql-10/share/extension |grep postgis.control
postgis.control
再次尝试添加拓展包:
[root@plat-ecloud01-andfleethe-prd-postgres04 extension]# /usr/pgsql-10/bin/psql -U postgres -p 9999 -h 10.176.21.39
Password for user postgres:
psql (10.4)
Type "help" for help.
postgres=# create extension postgis;
CREATE EXTENSION
postgres=# create extension pg_stat_statements;
CREATE EXTENSION
正常添加
转载自:https://blog.csdn.net/sunbocong/article/details/85791025