每件事 都有第一次第一次
讚賞你的勇氣
建議
註冊個帳號
以後可以常常來練習英文
每件事 都有第一次第一次
https://manpages.debian.org/jessie/apt/ ... html#FILESpoloshiao 写了:也許 跟 priority 設定 有關
https://manpages.debian.org/jessie/apt/ ... .5.en.html
但是 還沒找到 簡單易懂 的中文描述 可以提供給你
詳細參閱
https://manpages.debian.org/jessie/apt/ ... .8.en.html
apt-get - APT package handling utility -- command-line interface
install
Finally, the apt_preferences(5) mechanism allows you to create an alternative installation policy for individual packages.
https://manpages.debian.org/jessie/apt/ ... .5.en.html
apt_preferences - Preference control file for APT
How APT Interprets Priorities
貌似是"混源"(sources.list包含多个发行版的源)时才有用Several versions of a package may be available for installation when the sources.list(5) file contains references to more than one distribution (for example, stable and testing). APT assigns a priority to each version that is available. Subject to dependency constraints, apt-get selects the version with the highest priority for installation. The APT preferences override the priorities that APT assigns to package versions by default, thus giving the user control over which one is selected for installation.
參閱为何lxde-core推荐lxterminal但安装时不提示会安装?
1. -paptitude -P install -r lxde-core:
poloshiao 写了:參閱为何lxde-core推荐lxterminal但安装时不提示会安装?
1. http://www.linuxquestions.org/questions ... es-607670/
How to force aptitude to install recommended packages?
1-1. 不是建議你強制安裝 而是看看它如何安排強制安裝 能否給你一點點提示
2. https://aptitude.alioth.debian.org/doc/ ... 05s05.html
Configuration file reference
Prev Customizing aptitude
2-1. 使用 recommend 及 install 字串搜尋上面的文章 看看 有沒有共同的部份
2-2. 特別是 這兩個 Options
Option: Aptitude::Auto-Install
Option: APT::Install-Recommends
@poloshiaopoloshiao 写了:2. -r
2-1. https://www.debian.org/doc/manuals/apti ... 01.en.html
-r, --with-recommends
Treat recommendations as dependencies when installing new packages (this overrides settings in /etc/apt/apt.conf and ~/.aptitude/config).
This corresponds to the configuration option APT::Install-Recommends
所謂 overrides(this overrides settings in /etc/apt/apt.conf and ~/.aptitude/config).
在测试环境中相关配置文件不存在poloshiao 写了:所謂 overrides(this overrides settings in /etc/apt/apt.conf and ~/.aptitude/config).
猜測 應該針對 同一個 參數 Option
不同參數 應該還是有效
意思是
/etc/apt/apt.conf 及 ~/.aptitude/config
中 不同參數的 參數值
還是需要檢驗看看
https://www.debian.org/doc/manuals/apti ... ml#idm6624在测试环境中相关配置文件不存在
/etc/apt/apt.conf.d
里面的文件也没有发现与recommend相关的选项
测试环境是用debootstrap新安装的(stretch,jessie)基本系统
@科学之子vickycq 写了: 用一台无头服务器试了试,无法重现您的情况
代码: 全选
Aptitude::CmdLine::Verbose "2";
代码: 全选
aptitude --show-why install lxde-core > termit-debug
可能像poloshiao在本帖其它楼层说的,多个不同的包可能会存在版本混淆?vickycq 写了:但当我修改 lxde-core 的依赖,去掉 'lxpanel',再重新打包实验,发现还是会安装 termit。
我不确定,但是我把aptitude -P -r lxde-core输出的"即将安装"列表传给"aptitude show"vickycq 写了:可能还有其它没揪出来的。
在jessie也不太正常,本来lxterminal是自动安装的,却被标记为手动安装了(我用aptitude看到的,没用apt-mark确认)Consider that Jessie's lxpanel package does not list any terminal emulator as its recommends, the above thoery actually made sense to me.
昨天犯迷糊了,虽然已经“修改 lxde-core 的依赖,去掉 'lxpanel'”,但由于其它 lxde 核心组件的依赖,lxpanel 仍然会被安装,从而出现相同现象。因此,基本上可以确定就是 lxpanel 的问题。科学之子 写了:我不确定,但是我把aptitude -P -r lxde-core输出的"即将安装"列表传给"aptitude show"输出结果里搜索"x-terminal-emulator",只有lxce-core,lxpanel,termit,这三个
刚刚试了试,用debootstrap最小化安装一个jessie,然后把sources.list改成stretch的科学之子 写了: 在jessie也不太正常,本来lxterminal是自动安装的,却被标记为手动安装了(我用aptitude看到的,没用apt-mark确认)
不过jessie也快失去支持了,所以我们应该把注意力优先放在解决stretch的问题上?
@vickycqvickycq 写了:2. 使用 equivs 创建一个空软件包,使其 Recommends: lxterminal | x-terminal-emulator,然后到基本系统中安装之,发现可以安装 lxterminal。
然后,使用 equivs 再创建一个空软件包,使其 Recommends: x-terminal-emulator,即出现 "virtual-package-depends-without-real-package-depends" 问题,此时会安装 termit。
从这个实验可以看出,问题可能在于一个特殊的依赖链使得不必再安装 lxteminal,因为 x-terminal-emulator 已经在之前的匹配中被满足了。问题和那个 lintian 页面一样:当只依赖虚包时,如何确定选择哪个软件包。
到 deb 包所在目录下 使用 apt install ./XXX.deb 试试(注意要带路径 ./)科学之子 写了:equivs 创建空包后如何安装recommends?或者说安装方式是什么?我这里dpkg -i貌似不装recommends