我在Debian 9“拉伸”上看到了以下内容:
# apt-get upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following packages have been kept back:
linux-image-marvell
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.尽管此命令是根据"确保Debian手册的安全“更新Debian的一种正式方式,但更新程序不会安装。(读取这里时的快照)。
相反,aptitude和较新的apt命令都准备安装它。尽管如此,这个特定的版本并不是一个安全更新。我理解apt和潜在的aptitude有不同的缺省值。我想问Debian这方面的行为.
在描述如何应用更新时,“安全Debian手册”首先列出了aptitude。我知道apt有一些修改过的默认设置,应该更方便用户使用。仔细查看当前的,它将新用户指向apt或aptitude。我认为所有示例命令现在都引用apt,而不是apt-get。
我最初的假设是,内核的安全更新不会被Debian安全手册认可的更新方法所阻碍。(如果我假设错了,请告诉我:-)但我想确保我知道如何更新我的Debian系统。
apt而不是apt-get。对吗?apt-get,而从Debian 8升级到Debian 9的文档也引用了apt。因此,我认为最安全的选择是在Debian 8 -> Debian 9转换之前不使用D22?apt-get来执行某些任务?apt更热衷于应用更新的选择有评论,这具体证明了安全更新和非安全更新是有区别的?apt-get在我的系统上使用的正常配置一起应用?的详细信息
# apt-cache policy linux-image-marvell
linux-image-marvell:
Installed: 4.9+80+deb9u4
Candidate: 4.9+80+deb9u5
Version table:
4.9+80+deb9u5 500
500 http://ftp.uk.debian.org/debian stretch/main armel Packages
*** 4.9+80+deb9u4 500
500 http://security.debian.org stretch/updates/main armel Packages
100 /var/lib/dpkg/status# apt-cache policy apt
apt:
Installed: 1.4.8
Candidate: 1.4.8
...# aptitude upgrade
Resolving dependencies...
The following NEW packages will be installed:
linux-image-4.9.0-7-marvell{a}
The following packages will be upgraded:
linux-image-marvell
1 packages upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/21.9 MB of archives. After unpacking 91.2 MB will be used.
Do you want to continue? [Y/n/?] n
Abort.
# apt upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
linux-image-4.9.0-7-marvell
The following packages will be upgraded:
linux-image-marvell
1 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/21.9 MB of archives.
After this operation, 91.2 MB of additional disk space will be used.
Do you want to continue? [Y/n] n
Abort.发布于 2018-07-19 23:24:20
首先,我将从解释你看到的行为开始。默认情况下,apt-get非常保守,在运行upgrade时不会安装新包,只有dist-upgrade (可以用--with-new-pkgs选项更改)。另一方面,apt (默认情况下它启用了APT::Get::Upgrade-Allow-New选项)和aptitude (它有不同的解析算法)也是如此。因为内核经历了ABI的颠簸,所以升级它需要安装一个新的软件包.
还要注意的是,严格地说,您不是将这个内核更新作为一个安全修复,而是作为上周末9.5点发布的一部分。但这既不是这里也不是那里,因为优先事项是相同的。(您已经知道了,我已经为其他读者提到了这一点。) 内核的安全更新可能涉及ABI转储.,因此这种情况可以在安全更新和点发布更新中出现;对于Debian中的内核包来说,区别主要是机会和时间,因为所有内核更新都是安全更新。
现在回答你的问题:
apt现在是推荐的APT前端,是的,至少是用于交互的;它应该有更友好的默认设置(与apt-get相比)。这两个工具都使用相同的算法,apt-get可以配置为类似于apt;运行apt-config dump | grep Binary::apt来查看apt启用的特定设置。如果您喜欢aptitude,您也可以继续使用它。apt与apt-get完全等价,所以您也可以使用它;apt在Debian 9中走到了最前列,它的开发人员通过它的工作使它作为面向用户的工具更有用。Debian常见问题建议使用apt代替apt-get和apt-cache,从Debian8 (Jessie)开始。(我看到它对apt update的描述略有错误。)apt,因为它的接口可能会改变。除此之外,不应该有任何需要apt-get而不是apt的场景。apt不区分安全性更新和非安全性更新,除非您将其配置为安全更新。apt-get时,Debian常见问题引用apt-get dist-upgrade来保持Debian系统的更新。FAQ也比Debian 9更老,但最近更新了。https://unix.stackexchange.com/questions/457306
复制相似问题