如何正确解决包依赖关系

如何正确解决包依赖关系

我正在尝试安装以下软件包:

apt-get install postgresql postgresql-contrib  postgresql-common libpq-dev

我收到的信息是:

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:
 libpq-dev : Depends: libssl-dev but it is not going to be installed
             Depends: krb5-multidev but it is not going to be installed
             Depends: comerr-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

有没有一种合适的方法来解决这些问题,而不用陷入逐个寻找这些依赖项的困境,在这种情况下,我确信每个依赖项都会有自己的其他依赖项

答案1

首先进行更新

apt-get 更新

然后安装缺少的依赖项

apt-get 安装 libssl-dev krb5-multidev comerr-dev

希望您能收到这些软件包。否则,您将不得不手动通过互联网搜索软件包并安装。发生这种情况主要是因为软件包不在配置的存储库中

然后安装您的软件包。

apt-get 安装 postgresql postgresql-contrib postgresql-common libpq-dev

相关内容