安装 postgreSQL 9.6 时出现依赖错误

安装 postgreSQL 9.6 时出现依赖错误

在 odoo10 中安装 postgreSQL 时出现此错误:

root@aboorva:~# sudo apt-get install postgresql-9.6
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 postgresql-9.6 : Depends: postgresql-common (>= 171~) but it is not going to be installed
                  Depends: libsystemd0 but it is not installable
                  Recommends: postgresql-contrib-9.6 but it is not going to be installed
                  Recommends: sysstat but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

答案1

它告诉您,系统的库不允许您安装该版本的 postgres,因为您在安装时要求提供特定版本。

如果您只想要 postgres 而不关心具体版本,请尝试:

sudo apt-get install postgres

如果您想要该特定版本并且需要它,则需要删除该libsystem0软件包以及保持其安装的任何内容。

您的系统也可能已经下载并升级了某些软件包,或者在执行软件包更新时停止了。在这种情况下,您应该运行此命令来安装任何等待处理的缺失软件包:

sudo apt-get install -f

还值得注意的是,在尝试安装新版本之前,您可能需要删除现有版本的 postgres:

sudo apt-get remove postgres*

相关内容