This must be accepted explicitly before updates for this repository can be applied. See apt-secure

2023-10-15 12:50

本文主要是介绍This must be accepted explicitly before updates for this repository can be applied. See apt-secure,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!

安装ps命令使用如下命令遇到问题

apt-get update && apt-get install procps
# apt-get update && apt-get install procps
Get:1 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
Get:2 http://deb.debian.org/debian buster InRelease [122 kB]
Get:3 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Reading package lists... Done
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
N: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Version' value from '10.6' to '10.12'
E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.

改用命令

 apt update
# apt update
Get:1 http://deb.debian.org/debian buster InRelease [122 kB]
N: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Version' value from '10.6' to '10.12'
E: Repository 'http://deb.debian.org/debian buster InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
Get:2 http://deb.debian.org/debian buster-updates InRelease [51.9 kB]
Get:3 http://security.debian.org/debian-security buster/updates InRelease [65.4 kB]
E: Repository 'http://deb.debian.org/debian buster-updates InRelease' changed its 'Suite' value from 'stable-updates' to 'oldstable-updates'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
Get:4 http://deb.debian.org/debian buster/main amd64 Packages [7911 kB]
E: Repository 'http://security.debian.org/debian-security buster/updates InRelease' changed its 'Suite' value from 'stable' to 'oldstable'
N: This must be accepted explicitly before updates for this repository can be applied. See apt-secure(8) manpage for details.
Do you want to accept these changes and continue updating from this repository? [y/N] y
Get:5 http://deb.debian.org/debian buster-updates/main amd64 Packages.diff/Index [10.6 kB]
Ign:5 http://deb.debian.org/debian buster-updates/main amd64 Packages.diff/Index
Get:6 http://deb.debian.org/debian buster-updates/main amd64 Packages [8796 B]
Get:7 http://security.debian.org/debian-security buster/updates/main amd64 Packages [318 kB]
Fetched 8248 kB in 13s (625 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
61 packages can be upgraded. Run 'apt list --upgradable' to see them.
apt update && apt install procps

摘自:Linux中apt与apt-get命令的区别与解释 - 系统极客 (sysgeek.cn)

apt与apt-get

在开始对比 apt 与 apt-get 命令的区别之前,我们先来看看这两个命令的背景,以及它们要试图达到的目的。

Debian 作为 Ubuntu、Linux Mint 和 elementary OS 等 Linux 操作系统的母板,其具有强健的「包管理」系统,它的每个组件和应用程序都内置在系统中安装的软件包中。Debian 使用一套名为 Advanced Packaging Tool(APT)的工具来管理这种包系统,不过请不要把它与 apt 命令混淆,它们之间是其实不是同一个东西。

在基于 Debian 的 Linux 发行版中,有各种工具可以与 APT 进行交互,以方便用户安装、删除和管理的软件包。apt-get 便是其中一款广受欢迎的命令行工具,另外一款较为流行的是 Aptitude 这一命令行与 GUI 兼顾的小工具。

如果你已阅读过我们的 apt-get 命令指南,可能已经遇到过许多类似的命令,如apt-cache、apt-config 等。如你所见,这些命令都比较低级又包含众多功能,普通的 Linux 用户也许永远都不会使用到。换种说法来说,就是最常用的 Linux 包管理命令都被分散在了 apt-get、apt-cache 和 apt-config 这三条命令当中。

apt 命令的引入就是为了解决命令过于分散的问题,它包括了 apt-get 命令出现以来使用最广泛的功能选项,以及 apt-cache 和 apt-config 命令中很少用到的功能。

在使用 apt 命令时,用户不必再由 apt-get 转到 apt-cache 或 apt-config,而且 apt 更加结构化,并为用户提供了管理软件包所需的必要选项。

简单来说就是:apt = apt-get、apt-cache 和 apt-config 中最常用命令选项的集合。

apt与apt-get之间的区别

通过 apt 命令,用户可以在同一地方集中得到所有必要的工具,apt 的主要目的是提供一种以「让终端用户满意」的方式来处理 Linux 软件包的有效方式。

apt 具有更精减但足够的命令选项,而且参数选项的组织方式更为有效。除此之外,它默认启用的几个特性对最终用户也非常有帮助。例如,可以在使用 apt 命令安装或删除程序时看到进度条。

apt 还会在更新存储库数据库时提示用户可升级的软件包个数。

如果你使用 apt 的其它命令选项,也可以实现与使用 apt-get 时相同的操作。

apt和apt-get命令之间的区别

虽然 apt 与 apt-get 有一些类似的命令选项,但它并不能完全向下兼容 apt-get 命令。也就是说,可以用 apt 替换部分 apt-get 系列命令,但不是全部。

apt 命令取代的命令命令的功能
apt installapt-get install安装软件包
apt removeapt-get remove移除软件包
apt purgeapt-get purge移除软件包及配置文件
apt updateapt-get update刷新存储库索引
apt upgradeapt-get upgrade升级所有可升级的软件包
apt autoremoveapt-get autoremove自动删除不需要的包
apt full-upgradeapt-get dist-upgrade在升级软件包时自动处理依赖关系
apt searchapt-cache search搜索应用程序
apt showapt-cache show显示装细节

当然,apt 还有一些自己的命令:

新的apt命令命令的功能
apt list列出包含条件的包(已安装,可升级等)
apt edit-sources编辑源列表

需要大家注意的是:apt 命令也还在不断发展, 因此,你可能会在将来的版本中看到新的选项。

apt-get已弃用?

目前还没有任何 Linux 发行版官方放出 apt-get 将被停用的消息,至少它还有比 apt 更多、更细化的操作功能。对于低级操作,仍然需要 apt-get。

我应该使用apt还是apt-get?

既然两个命令都有用,那么我该使用 apt 还是 apt-get 呢?作为一个常规 Linux 用户,系统极客建议大家尽快适应并开始首先使用 apt。不仅因为广大 Linux 发行商都在推荐 apt,更主要的还是它提供了 Linux 包管理的必要选项。

最重要的是,apt 命令选项更少更易记,因此也更易用,所以没理由继续坚持 apt-get。

小结

最后结大家提供两点使用上的建议:

  • apt 可以看作 apt-get 和 apt-cache 命令的子集, 可以为包管理提供必要的命令选项。
  • apt-get 虽然没被弃用,但作为普通用户,还是应该首先使用 apt。

这篇关于This must be accepted explicitly before updates for this repository can be applied. See apt-secure的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!



http://www.chinasem.cn/article/217821

相关文章

ubuntu通过apt的方式更新cmake到最新版(ppa)

添加签名密钥 wget -O - https://apt.kitware.com/keys/kitware-archive-latest.asc 2>/dev/null | sudo apt-key add - 将存储库添加到您的源列表并进行更新 稳定版 sudo apt-add-repository 'deb https://apt.kitware.com/ubuntu/ bionic ma

Spring 注解(@Repository 、@Service 和 @Controller )

Spring 2.5 中除了提供 @Component 注释外,还定义了几个拥有特殊语义的注释,它们分别是:@Repository、@Service 和 @Controller 。         在目前的 Spring 版本中,这 3 个注释和 @Component 是等效的,但是从注释类的命名上,很容易看出这 3 个注释分别和持久层 、业务层 和控制层 相对应。虽然目前这 3 个注释和 @

apt-get update更新源时,出现“Hash Sum mismatch”问题

转载自:apt-get update更新源时,出现“Hash Sum mismatch”问题 当使用apt-get update更新源时,出现下面“Hash Sum mismatch”的报错,具体如下: root@localhost:~# apt-get update ...... ...... W: Failed to fetch http://us.archive.ubuntu.com/ub

Error: label vector and instance matrix must be double的解决方法

在使用uci下载的数据时,建模时出现这个错误的解决方法 首先现在UCI上面下载数据 然后右键另存为就行了。这样我们就从UCI里面下载到了训练数据 在matlab 点 导入数据,数据类型要记得选第二个, 如果选择最后一个table就会出现这个问题 最后附上代码 %%之前先import wine.date IMPORTED DATA 设为Numeric Matrix (数值矩

编译时出现错误 -- clang: error: linker command failed with exit code 1 (use -v to see invocation)

出现这个错误的原因有多种,常见的是因为某些文件的缺失或者是文件的重复导致的。 这类错误查看的关键在于其上一行的文字。 对于文件缺少而导致错误的情况: 例如上图中的示例,其上一行文字为 ld:library not found for -lrxl,可以看出是缺失了某一文件而导致的错误,这行文字中的最后“ -lrxl ”:-l 代表着其前缀是“lib”,连着后面的 rxl,其名称为 libr

vue3 el-menu 菜单Maximum recursive updates exceeded 报错

vue3 用el-menu实现管理后台左侧菜单,报Uncaught (in promise) Maximum recursive updates exceeded in component <ElMenu>. This means you have a reactive effect that is mutating its own dependencies and thus recursivel

PostgreSQL 报错 because it does not have a replica identity and publishes updates

(update,delete触发,insert不触发)because it does not have a replica identity and publishes updates Hint: To enable updating from the table, set REPLICA IDENTITY using ALTER TABLE 如果相关表涉及了逻辑复制,且对应表没有主键,则需要

已经存在的项目如何变成git的一个repository

已经存在的项目如何被git管理 背景: 有一套代码很敏感,可能动不动就要不能正常工作(硬件开发常事),那改动一下下就要有个记录,就决定用git管理 已经有了服务里里docker里运行的gitbucket,已经有了开发用的电脑上的git客户端(Git-2.28.0-64-bit.exe) 很简单的方法: 开发用的电脑上安装git客户端 右键 选 create new resposito

/var/log/secure安全日志分析

1、tail -f /var/log/secure 看安全日志判断是否有人恶意攻击服务器 1.1 表示root用户关闭了会话(也就是关闭了终端) xxx sshd: pam_unix(sshd:session): session closed for user root 1.2 表示接受来自14.23.168.10的root用户的公钥登录 xxx sshd: Accepted public