Не могу установить php 7.2 на Debian 9 (Stretch)

Я добавил репозиторий для установки php 7.2 на Debian Stretch.

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

person tropic    schedule 11.07.2018    source источник


Ответы (2)


Если это поможет, вот точные шаги (более или менее похожие на ваши), которые я использовал для установки php 7.2 на Debian Stretch несколько часов назад:

sudo apt install ca-certificates apt-transport-https
wget -q https://packages.sury.org/php/apt.gpg -O- | sudo apt-key add -
echo "deb https://packages.sury.org/php/ stretch main" | sudo tee /etc/apt/sources.list.d/php.list
cd /etc/apt/sources.list.d/
sudo mv ondrej-ubuntu* /tmp
sudo apt -y update
sudo apt install php7.2
person dmdip    schedule 29.08.2018
comment
ебать, большое спасибо, так что нам никогда не следует смешивать Ubuntu с Debian? - person javier_domenech; 04.03.2019

Если вы найдете файлы, перечисленные ниже, в вашем каталоге /etc/apt/sources.list.d/, просто удалите их и повторите попытку:

ondrej-ubuntu-apache2-cosmic.list
ondrej-ubuntu-php-cosmic.list
ondrej-ubuntu-php-cosmic.list.save
person dmdip    schedule 29.08.2018
comment
Спасибо за ответ. В моем /etc/apt/sources.list.d/ таких файлов нет - person tropic; 29.08.2018