Debian
由於 deb.sury PHP PPA,無法將 Debian Jessie 升級到穩定版
我正在嘗試按照本教程將我的 Linode Jessie 實例升級到穩定版。我已經升級了我的
/etc/apt/sources.list
文件,並且已經完成了這$ sudo apt update
一步。當我輸入該命令時,我得到以下資訊:Hit http://mirrors.linode.com stable InRelease Hit http://mirrors.linode.com stable-updates InRelease Ign http://nyc2.mirrors.digitalocean.com stable InRelease Hit http://archive.debian.org jessie-backports InRelease Ign http://nyc2.mirrors.digitalocean.com stable Release.gpg Ign http://nyc2.mirrors.digitalocean.com stable Release Get:1 http://security.debian.org stable/updates InRelease [39.1 kB] Get:2 https://packages.sury.org stable InRelease Ign https://packages.sury.org stable InRelease Get:3 http://mirrors.linode.com stable/main Sources [7,827 kB] W: There is no public key available for the following key IDs: 648ACFD622F3D138 NO_PUBKEY DCC9EFBF77E11517 W: There is no public key available for the following key IDs: 648ACFD622F3D138 E: Release file for http://archive.debian.org/debian/dists/jessie-backports/InRelease is expired (invalid since 145d 4h 29min 16s). Updates for this repository will not be applied.
我前面提到
/etc/apt/sources.list
的文件是:# # deb cdrom:[Debian GNU/Linux 8.3.0 _Jessie_ - Official Multi-architecture amd6$ #deb cdrom:[Debian GNU/Linux 8.3.0 _Jessie_ - Official Multi-architecture amd64$ deb http://mirrors.linode.com/debian/ stable main deb-src http://mirrors.linode.com/debian/ stable main deb http://security.debian.org/ stable/updates main deb-src http://security.debian.org/ stable/updates main # jessie-updates, previously known as 'volatile' deb http://mirrors.linode.com/debian/ stable-updates main deb [arch=i386,ppc64el,amd64] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.2/debian stable main # deb-src [arch=i386,ppc64el,amd64] http://nyc2.mirrors.digitalocean.com/mariadb/repo/10.2/debian stable main deb-src http://mirrors.linode.com/debian/ stable-updates main
在對 PPA 進行一些研究時,我還將我的 `/etc/apt/sources.list.d/php.list 文件更新為:
deb https://packages.sury.org/php/ stable main
但錯誤仍然存在。
有沒有辦法升級這個 PPA 以便它可以與 Debian Stable 一起使用?還是有其他方法可以解決這個問題?
您只是缺少簽名密鑰;新版本中的軟體包使用新密鑰進行簽名。您可以從密鑰伺服器獲取密鑰並將它們保存為新文件
/etc/apt/trusted.gpg.d/
:$ sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/debian-archive-buster-automatic.gpg --keyserver keyserver.ubuntu.com --recv 648ACFD622F3D138 gpg: keyring '/etc/apt/trusted.gpg.d/debian-archive-buster-automatic.gpg' created gpg: key DC30D7C23CBBABEE: public key "Debian Archive Automatic Signing Key (10/buster) <ftpmaster@debian.org>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1 $ sudo gpg --no-default-keyring --keyring gnupg-ring:/etc/apt/trusted.gpg.d/debian-archive-buster-stable.gpg --keyserver keyserver.ubuntu.com --recv DCC9EFBF77E11517 gpg: keyring '/etc/apt/trusted.gpg.d/debian-archive-buster-stable.gpg' created gpg: key DCC9EFBF77E11517: public key "Debian Stable Release Key (10/buster) <debian-release@lists.debian.org>" imported gpg: no ultimately trusted keys found gpg: Total number processed: 1 gpg: imported: 1
如果這些文件的權限是別的東西,請將它們更改為
-rw-r--r--
使用:sudo chmod 644 /etc/apt/trusted.gpg.d/debian-archive-buster-automatic.gpg sudo chmod 644 /etc/apt/trusted.gpg.d/debian-archive-buster-stable.gpg
現在應該在
apt-key list
& 的輸出中列出這些鍵,並修復錯誤apt update
。