我要安装{em>严格依赖于package
版本version-1
的{{1}}版本的软件包some-library
。严格来说,我的意思是将依赖项声明为严格相等(即version-1
):
=
现在,存储库# control file of the DEB package of 'package'
Package: package
Version: version-1
...
Depends: some-library (=version-1)
中存在some-library
的较新版本,这似乎导致version-2
完全拒绝安装。这是我得到的错误:
apt
如果没有以下内容,我将如何$ sudo apt install package=version-1
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:
package : Depends: some-library (= version-1) but version-2 is to be installed
E: Unable to correct problems, you have held broken packages.
安装apt
package=version-1
提供的交互式冲突解决方案。这是因为最终目标是在我的持续集成环境中非交互地执行安装aptitude
。这是因为我想验证apt install package=version-1 some-library=version-1
是否正确引入了package
作为依赖项