我在Debian Stretch上添加了一个软件源以安装PHP 7.2。
sudo apt install apt-transport-https lsb-release ca-certificates
sudo wget -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
但是当我运行apt update时,出现错误:
E: The repository 'https://packages.sury.org/php stretch Release' does not have a Release file.
据我所知,问题出在我的环境上。 但是我无法确定问题出在哪里。 PS: 我的/etc/apt/sources.list文件:
# deb http://ftp.de.debian.org/debian/ jessie main
# deb http://ftp.de.debian.org/debian/ buster main
deb http://ftp.de.debian.org/debian/ stretch main
deb http://ftp.us.debian.org/debian/ stretch main contrib non-free
deb-src http://ftp.us.debian.org/debian/ stretch main contrib non-free
deb http://security.debian.org/debian-security stretch/updates main contrib non-free
deb http://ftp.by.debian.org/debian/ stretch-updates main
deb http://mirror.yandex.ru/debian/ stretch-backports main contrib non-free
deb http://ftp.debian.org/debian/ stretch-backports main
deb http://dl.winehq.org/wine-builds/debian/ stretch main
在 /etc/apt/sources.list.d 目录下有一个名为 php.list 的文件,其中包含以下内容:
deb https://packages.sury.org/php/ stretch main