Ubuntu 16.04,docker,根本没有安装任何软件包。我有一个A
依赖于 ffmpeg 的软件包:
# apt show A
...
Depends: ..., ffmpeg (= 3.4-7), ...
...
ffmpeg
我的自定义存储库中有一个比系统一更新的版本aptly
,但由于7:
前缀较低:
# apt policy ffmpeg
ffmpeg:
Installed: (none)
Candidate: 7:2.8.11-0ubuntu0.16.04.1
Version table:
7:2.8.11-0ubuntu0.16.04.1 500
500 http://archive.ubuntu.com/ubuntu xenial-updates/universe amd64 Packages
500 http://security.ubuntu.com/ubuntu xenial-security/universe amd64 Packages
7:2.8.6-1ubuntu2 500
500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
3.4-7 500
500 http://packages.tnt/aptly/public/orion/ubuntu xenial/master amd64 Packages
当我尝试安装时A
:
# apt install A
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:
A : Depends: ffmpeg (= 3.4-7) but 7:2.8.11-0ubuntu0.16.04.1 is to be installed
E: Unable to correct problems, you have held broken packages.
但
apt install ffmpeg=3.4-7 && apt install A
作品!
- 为什么
apt
会有这样的行为? - 如何才能让
apt install A
工作如预期?