简体   繁体   English

我无法将 nginx PHP 版本升级到 ubuntu 16 上的最新版本

[英]I can't upgrade nginx PHP version to latest on ubuntu 16

I have tried to upgrade the PHP version.我试过升级PHP版本。 but I just get errors.但我只是得到错误。

I tried this tutorial .我试过这个教程

apt update
apt upgrade

apt install software-properties-common
add-apt-repository ppa:ondrej/nginx

apt update
apt upgrade

apt install php8.0 php8.0-cli php8.0-fpm php8.0-apcu php8.0-opcache 
php8.0-common php8.0-pear php8.0-curl php8.0-zip php8.0-mcrypt php8.0-mysql 
php8.0-mbstring php8.0-xml php8.0-gd php8.0-gmagick php8.0-imagick 
php8.0-xmlrpc php7.3-maxminddb

but I get this error.但我得到这个错误。

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php8.0
E: Couldn't find any package by glob 'php8.0'
E: Couldn't find any package by regex 'php8.0'
E: Unable to locate package php8.0-cli
E: Couldn't find any package by glob 'php8.0-cli'
E: Couldn't find any package by regex 'php8.0-cli'
E: Unable to locate package php8.0-fpm
E: Couldn't find any package by glob 'php8.0-fpm'
E: Couldn't find any package by regex 'php8.0-fpm'
E: Unable to locate package php8.0-apcu
E: Couldn't find any package by glob 'php8.0-apcu'
E: Couldn't find any package by regex 'php8.0-apcu'
E: Unable to locate package php8.0-opcache
...

How can I solve this problem?我怎么解决这个问题?

I have tried my tutorial.我试过我的教程。 but just get same error like this.但只是得到这样的相同错误。

Try apt full-upgrade and apt upgrade and the last command apt get update try this three command, and restart the machine it will resolve.尝试apt full-upgradeapt upgrade以及最后一个命令apt get update尝试这三个命令,然后重新启动机器它将解决。

As stated in the ppa description :ppa 描述中所述

Only Supported Versions of PHP ( http://php.net/supported-versions.php ) for Supported Ubuntu Releases ( https://wiki.ubuntu.com/Releases ) are provided.仅提供受支持的 PHP ( http://php.net/supported-versions.php )版本( https://wiki.ubuntu.com/Releases )。

Ubuntu 16.04 is no longer supported since April 2021, so I think there is also no longer a xenial branch of php 8.0. Ubuntu 16.04 自 2021 年 4 月起不再受支持,因此我认为 php 8.0 也不再有 xenial 分支。 I'd suggest to upgrade Ubuntu to ver.我建议将 Ubuntu 升级到版本。 20.04 LTS in order to be able to use php 8.0 20.04 LTS 以便能够使用 php 8.0

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM