ATP 5 apt.conf

来源:互联网 发布:思路网源码 编辑:程序博客网 时间:2024/06/05 22:41
用apt安装chromium-browser的时候,会出现如下错误提示:

E: 无法立即对 python-minimal 进行配置。请查看 man 5 apt.conf 中的 APT::Immediate-Configure (2)

如下为man中的参考:
原文
Immediate-Configure
Defaults to on which will cause APT to install essential and important packages as fast as possible in the install/upgrade operation. 
               This is done to limit the effect of a failing dpkg(1) call: If this option is disabled APT does treat an important package in the same way as an extra package: Between the unpacking of the important package A and his configuration can then be many other unpack or configuration calls, e.g. for package B which has no relation to A, but causes the dpkg call to fail (e.g. because maintainer script of package B generates an error) which results in a system state in which package A is unpacked but unconfigured - each package depending on A is now no longer guaranteed to work as their dependency on A is not longer satisfied. The immediate configuration marker is also applied to all dependencies which can generate a problem if the dependencies e.g. form a circle as a dependency with the immediate flag is comparable with a Pre-Dependency. 
So in theory it is possible that APT encounters a situation in which it is unable to perform immediate configuration, errors out and refers to this option so the user can deactivate the immediate configuration temporarily to be able to perform an install/upgrade again. 
Note the use of the word "theory" here as this problem was only encountered by now in real world a few times in non-stable distribution versions and was caused by wrong dependencies of the package in question or by a system in an already broken state, so you should not blindly disable this option as the mentioned scenario above is not the only problem immediate configuration can help to prevent in the first place. 
Before a big operation like dist-upgrade is run with this option disabled it should be tried to explicitly install the package APT is unable to configure immediately, but please make sure to report your problem also to your distribution and to the APT team with the buglink below so they can work on improving or correcting the upgrade process.

译文:
这样做是为了限制dpkg(1)调用失败造成的影响:如果这个选项被禁用了,APT将视关键包如额外包:在一个关键包A的解包和配置之间可能发生了其他包解包或者配置操作调用,例如和A无关的包B,却也导致了dpkg调用失败(例如,因为包B的维护脚本产生了一个错误),结果导致系统状态为包A解包成功但是配置未完成-这就导致了依赖的不一致(意译:)。快速配置(Immediate configuration)标记也适用于所有依赖项,可以生成一个问题如果依赖如围成一个圈作为一个依赖与当前的标记是可比较的一个pre的依赖。(词句为机器翻译)
所以理论上来说当APT遇到不能执行快速操作的时候,会抛出错误并引用该选项以便用户可以暂时关闭该配置项然后再执行安装/升级操作。注意,这里使用理论上来向,在现实场景在某些不稳定的发布版本中会极少情况发生包的错误依赖或者系统已经处于不正常状态,所以用户不能盲目的关闭此选项就像上文提及的场景。
在关闭该选项执行一些重要操作的时候如dist-upgrade,它(系统)会显示地安装包,APT将不会及时配置。如果遇到问题请同事提交版本发布人员以及APT团队。


对问题的思考:
当时是用的发布版本是ubuntu10.10,已不再被支持。但是还是稳定版本,所以应当是红字之前的原因。回去做一下试验看看。