首页 > 解决方案 > 无法安装 PHP 7.3:“找不到发布”

问题描述

我想安装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

我遵循的指南是如何在 Ubuntu 上安装 PHP(7、7.2 或 7.3)

标签: phpcomposer-php

解决方案


看起来您的系统正在尝试使用eoan尚未发布的 Ubuntu 发行版,因此该 PPA 上不存在该发行版的软件包也就不足为奇了。

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

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


推荐阅读