
Я хочу обновить версию PHP на своей виртуальной машине, и для этого мне нужно запустить sudo apt-get update на своей виртуальной машине в Compute Engine (облачная платформа Google). Но я постоянно получаю сообщение об ошибке, в котором говорится, что открытый ключ недоступен.
Вот мое окружение:
Linux wordpress-1-vm 4.9.0-5-amd64 #1 SMP Debian 4.9.65-3+deb9u2 (2018-01-04) x86_64 GNU/Linux
Вот какие ошибки я получаю:
Ign:1 http://ppa.launchpad.net/ondrej/php/ubuntu hirsute InRelease Err:2 http://ppa.launchpad.net/ondrej/php/ubuntu hirsute Release 404 Not Found Reading package lists... Done E: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu hirsute Release' does not have a Release file. N: Updating from such a repository can't be done securely, and is therefore disabled by default. N: See apt-secure(8) manpage for repository creation and user configuration details.
Может ли кто-нибудь помочь? Пожалуйста.
решение1
Вам необходимо добавить Debia DPA вместо Ubutnu PPA, а затем импортировать ключ gpg (чтобы устранить ошибку apt-secure).
Удалите Sury PPA из вашего /etc/apt/sources.list
или ниже /etc/apt/sources.list.d/
.
sudo apt -y install apt-transport-https lsb-release ca-certificates curl
sudo curl -sSL -o /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
sudo sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list'
sudo apt update