我一直试图将 Ubuntu 机器上的 postgresql 从 9.3 升级到 10。当我尝试
sudo apt-get install postgresql-10
我明白了
The following packages have unmet dependencies:
postgresql-10 : Depends: postgresql-client-10 but it is not going to be installed
Depends: postgresql-common (>= 182~) but it is not going to be installed
Depends: libicu55 (>= 55.1-1~) but it is not installable
Depends: libpq5 (>= 9.3~) but it is not going to be installed
Depends: libsystemd0 but it is not installable
然后当我尝试
sudo apt-get install libpq5
我明白了
The following packages have unmet dependencies:
libpq5 : Depends: libssl1.0.0 (>= 1.0.2~beta3) but 1.0.1f-1ubuntu2.26 is to be installed
互联网上的一个答案建议我安装特定的版本,所以我尝试了
sudo apt-get install libssl1.0.0=1.0.2g-1ubuntu4.1
但我得到了
E: Version '1.0.2g-1ubuntu4.1' for 'libssl1.0.0' was not found
我尝试过互联网上给出的很多答案但都没有用。
答案1
所以无法安装的原因是它以某种方式尝试安装与 ubuntu 14.04 不兼容的版本,所以我从同事那里获取了已安装的版本,并且成功了。要安装的版本
libpq5:amd64 11.0-1.pgdg14.04+2 postgresql-client-common 195.pgdg14.04+1 postgresql-client-10 10.5-2.pgdg14.04+1 postgresql-10 10.5-2.pgdg14.04+1