为何lxde-core推荐lxterminal但安装时不提示会安装?

最大的社区版本,Ubuntu的发源地
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 为何lxde-core推荐lxterminal但安装时不提示会安装?

#16

帖子 poloshiao » 2017-05-07 7:11

第一次
每件事 都有第一次
讚賞你的勇氣

建議
註冊個帳號
以後可以常常來練習英文
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 为何lxde-core推荐lxterminal但安装时不提示会安装?

#17

帖子 poloshiao » 2017-05-07 7:17

也許 跟 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
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: 为何lxde-core推荐lxterminal但安装时不提示会安装?

#18

帖子 科学之子 » 2017-05-07 21:37

poloshiao 写了:也許 跟 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
https://manpages.debian.org/jessie/apt/ ... html#FILES
没有相关文件,猜测是默认状态
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.
貌似是"混源"(sources.list包含多个发行版的源)时才有用
我这里的安装环境是debootstrap安装,然后chroot进去,不存在混源的问题
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 为何lxde-core推荐lxterminal但安装时不提示会安装?

#19

帖子 poloshiao » 2017-05-08 6:22

为何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
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: 为何lxde-core推荐lxterminal但安装时不提示会安装?

#20

帖子 poloshiao » 2017-05-08 11:28

aptitude -P install -r lxde-core:
1. -p
1-1. https://www.debian.org/doc/manuals/apti ... 01.en.html
-P, --prompt
Always display a prompt before downloading, installing or removing packages, even when no actions other than those explicitly requested will be performed.
This corresponds to the configuration option Aptitude::CmdLine::Always-Prompt.
1-1-1. https://www.debian.org/doc/manuals/apti ... ml#idm6654
Option: Aptitude::CmdLine::Always-Prompt
Default: false
Description: In command-line mode, if this is set, aptitude will always prompt before starting to install or remove packages, even if the prompt would normally be skipped. This is equivalent to the -P command-line option.

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
2-1-1. https://www.debian.org/doc/manuals/apti ... ml#idm6654
Option: Aptitude::Auto-Install
Default: true
Description: If this option is true, aptitude will automatically attempt to fulfill the dependencies of a package when you mark a package to be installed or upgraded.
2-1-2. https://www.debian.org/doc/manuals/apti ... ml#idm6654
Option: APT::Install-Recommends
Default: true
Description: If this option is true and Aptitude::Auto-Install is true, then whenever you mark a package for installation, aptitude will also mark the packages it recommends for installation. Furthermore, if this option is true, aptitude will not consider packages to be unused (and thus will not automatically remove them) as long as any installed package reommends them. For more information, see the section called “Managing automatically installed packages” and the section called “Immediate dependency resolution”.
2-1-2-1. https://www.debian.org/doc/manuals/apti ... 02.en.html
Immediate dependency resolution
Whenever you choose to install or upgrade a package in aptitude, aptitude makes an immediate attempt to resolve any of its dependencies that are not fulfilled. For each unsatisfied dependency (either a “Depends”, a “recommends”, or a “Conflicts”), it performs the following steps:
If the dependency is a recommendation, aptitude tries to guess whether it is a “new” recommendation or a “previously satisfied” recommendation. aptitude considers a recommendation to be “new” if the package declaring the recommendation is not currently installed, or if its installed version does not recommend a package of the same name. On the other hand, a recommendation is “previously satisfied” if the package declaring the recommendation is installed, the currently installed version recommends a package of the same name, and that recommendation is currently fulfilled.
For example: suppose that version 1.0 of prog recommends version 4.0 of libcool1, but version 2.0 of prog recommends version 5.0 of libcool1, and also recommends apache. If you choose to upgrade prog from version 1.0 to version 2.0, the recommendation of apache will be considered to be “new” because version 1.0 of prog did not recommend apache. On the other hand, the recommendation of libcool1 is not “new”, because version 1.0 of prog recommended libcool1, even though it recommended a different version. However, if libcool1 is installed, then that recommendation will be considered to be “previously satisfied”.
If the configuration option APT::Install-recommends is true, aptitude will always attempt to fulfill “new” and “previously satisfied” recommendations; all others will be ignored by immediate resolution. If that option is false, immediate dependency resolution will ignore all recommendations.
2-1-2-2. 注意 最後一句話
If the configuration option APT::Install-recommends is true, ....
If that option is false, ...
兩者處理方式 不同
科学之子
帖子: 2284
注册时间: 2013-05-26 6:58
系统: Debian 9

Re: 为何lxde-core推荐lxterminal但安装时不提示会安装?

#21

帖子 科学之子 » 2017-05-09 13:44

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
poloshiao 写了:2. -r
2-1.