明确接受PPA“Label”的变更

当我在我的Ubuntu 17.10上运行apt-get update时,我收到以下错误:
E: Repository 'http://ppa.launchpad.net/ondrej/php/ubuntu artful InRelease' changed its 'Label' value from '*****
The main PPA for PHP (5.6, 7.0, 7.1) with many PECL extensions *****' to '*****
The main PPA for supported PHP versions with many PECL extensions *****'
N: This must be accepted explicitly before updates for this repository can be applied.
See apt-secure(8) manpage for details."

这个man页面并没有真正指出解决方案。我的问题是,我如何明确地接受这个更改?

14就我所知,apt-get有点过时了,现在使用apt。例如,sudo apt update等。 - Panther
4个回答

如果您发布了您的存储库,那会很有帮助,但是,话虽如此,您有两种方法可以解决这个问题。

第一种方法是使用apt而不是apt-get。在最新的Ubuntu版本中,aptapt-get更适合交互式使用;理论上,apt应该能够为您修复这个问题。

sudo apt update
sudo apt upgrade

您的第二个选择是使用--allow-releaseinfo-change

sudo apt-get update --allow-releaseinfo-change

如果这些选项不能解决问题,请发布您的存储库。您是否使用了混合存储库或固定版本?最后,请告诉我们,这是升级吗?

1使用第二个命令时出现错误:

sudo apt-get --allow-release-info-change update

E:无法理解命令行选项--allow-release-info-change与其他选项的组合
- Roel Van de Paar
5使用sudo apt update解决了这个问题。我收到提示:“您是否要接受这些更改并继续从该软件源进行更新?[y/N]”。 - Ruben O. Chiavone
3apt-get 命令在我这里起作用了,在更新命令之后加上 --allow-releaseinfo-change - SpinUp __ A Davis
如果您以非交互方式调用apt(例如,shell没有控制终端),那么这些选项都不起作用。即使使用--yes选项,也需要有一个控制终端才会生效。只有在从gnome-terminal(或xterm,或其他终端)运行这些命令时,这些选项才会起作用。 - bgoodr
它运作得很好! - Kamil Naja

你需要使用apt而不是apt-get。它会以交互方式要求你接受更改。只需运行以下命令即可:
sudo apt update

它应该问你:
Do you want to accept these changes and continue updating from this repository? [y/N] 

如果你想部署它,例如一次在多个服务器上运行,那么执行以下操作:
apt-get update --allow-releaseinfo-change
apt-get update
apt-get install packagename

不需要进行第二个 apt-get update - Fanatique

对我来说,答案在这里:

https://neon.kde.org/faq#command-to-update

我给你提供链接是因为我认为它会根据需要进行更新。目前,它的内容是你必须运行:
pkcon refresh
pkcon update

希望我的电脑在完成后还能正常工作。这就是我正在运行的内容。