无法安装PHP 7.3:“找不到发行版”

时间:2019-05-10 07:16:01

标签: php composer-php

我想安装php7.3。我使用以下脚本。

apt-get update && apt-get upgrade && \
    apt-get -y install software-properties-common && \
    add-apt-repository ppa:ondrej/php && \
    apt-get update && \
    apt-get -y install  php7.3 \
                        php7.3-mbstring

错误提示:

W: The repository 'http://ppa.launchpad.net/ondrej/php/ubuntu eoan Release' does not have a Release file.
E: Failed to fetch http://ppa.launchpad.net/ondrej/php/ubuntu/dists/eoan/main/binary-amd64/Packages  404  Not Found
E: Some index files failed to download. They have been ignored, or old ones used instead.

我正在使用:

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.04.2 LTS
Release:    18.04
Codename:   bionic

我遵循的指南是How to install PHP (7, 7.2 or 7.3) on Ubuntu

1 个答案:

答案 0 :(得分:3)

您的系统似乎正在尝试使用eoan发行版的Ubuntu(尚未发布),因此也难怪该PPA中不存在用于该发行版的软件包。

您可以在eoan的相关文件中将bionic手动更改为/etc/apt/sources.list.d/,然后再次运行apt-get update && apt-get -y install php7.3 php7.3-mbstring

为什么我的系统使用eoan而不是bionic,我无法回答。

相关问题