Google Compute Engine で PHP を更新する際に sudo apt get update を実行できない

Google Compute Engine で PHP を更新する際に sudo apt get update を実行できない

VM 上の PHP バージョンを更新したいのですが、そのためには Compute Engine (Google Cloud Platform) の VM 上で sudo apt-get update を実行する必要があります。しかし、公開鍵が利用できないというエラーが繰り返し表示されます。

私の環境は次のとおりです:

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

Ubutnu PPA の代わりに debia DPA を追加し、gpg キーをインポートする必要があります (apt-secure エラーを解決するため)。

/etc/apt/sources.listまたは以下から Sury PPA を削除します/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

オンドレイ・スリー

インストールガイド: ReadMe スクリプト

関連情報