无法在ubuntu上将Postgresql 11的Postgis 2.5升级到3.0.1

问题描述

我需要使用PostGIT 2.5到3.0.1将Postgresql 11升级到Postgresql 12。

我试图在ubuntu服务器上安装Postgresql 11的PostGIS 3 for Postgresql 11,然后再升级Postgresql

我跑步

apt-get install postgresql-10-postgis-3

并得到错误

The following NEW packages will be installed:
  postgresql-10-postgis-3 postgresql-10-postgis-3-scripts
0 upgraded,2 newly installed,0 to remove and 403 not upgraded.
Need to get 1,883 kB of archives.
After this operation,30.0 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-10-postgis-3-scripts all 3.0.1+dfsg-4.pgdg16.04+1 [1,052 kB]
Get:2 http://apt.postgresql.org/pub/repos/apt xenial-pgdg/main amd64 postgresql-10-postgis-3 amd64 3.0.1+dfsg-4.pgdg16.04+1 [831 kB]
Fetched 1,883 kB in 19s (97.0 kB/s)                                            
Selecting prevIoUsly unselected package postgresql-10-postgis-3-scripts.
(Reading database ... 175146 files and directories currently installed.)
Preparing to unpack .../postgresql-10-postgis-3-scripts_3.0.1+dfsg-4.pgdg16.04+1_all.deb ...
Unpacking postgresql-10-postgis-3-scripts (3.0.1+dfsg-4.pgdg16.04+1) ...
dpkg: error processing archive /var/cache/apt/archives/postgresql-10-postgis-3-scripts_3.0.1+dfsg-4.pgdg16.04+1_all.deb (--unpack):
 trying to overwrite '/usr/share/postgresql/10/applications/shp2pgsql-gui.desktop',which is also in package postgresql-10-postgis-2.5-scripts 2.5.4+dfsg-1.pgdg16.04+1
dpkg-deb: error: subprocess paste was killed by signal (broken pipe)
Selecting prevIoUsly unselected package postgresql-10-postgis-3.
Preparing to unpack .../postgresql-10-postgis-3_3.0.1+dfsg-4.pgdg16.04+1_amd64.deb ...
Unpacking postgresql-10-postgis-3 (3.0.1+dfsg-4.pgdg16.04+1) ...
Processing triggers for postgresql-common (216.pgdg16.04+1) ...
Building Postgresql dictionaries from installed myspell/hunspell packages...
  en_us
Removing obsolete dictionary files:
Errors were encountered while processing:
 /var/cache/apt/archives/postgresql-10-postgis-3-scripts_3.0.1+dfsg-4.pgdg16.04+1_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

有人遇到这样的问题吗?任何提示表示赞赏。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)