在Ubuntu 18.04中安装php8.2时出现错误:E: 无法定位软件包php8.2。

huangapple go评论76阅读模式
英文:

php8.2 in ubuntu 18.04 : E: Unable to locate package php8.2

问题

需要一些帮助,我无法在Ubuntu 18中安装php8.2-fpm,这是我的命令:

sudo apt install lsb-release apt-transport-https ca-certificates software-properties-common -y
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2

这是响应:

$ sudo apt-get install php8.2 php8.2-fpm
正在读取软件包列表... 完成
正在构建依赖关系树
正在读取状态信息... 完成
E: 无法定位软件包 php8.2
E: 无法找到任何与 glob 'php8.2' 匹配的软件包
E: 无法找到任何与 regex 'php8.2' 匹配的软件包
E: 无法定位软件包 php8.2-fpm
E: 无法找到任何与 glob 'php8.2-fpm' 匹配的软件包
E: 无法找到任何与 regex 'php8.2-fpm' 匹配的软件包
英文:

Need some help, I cant install php8.2-fpm in ubuntu 18, heres my commands

sudo apt install lsb-release apt-transport-https ca-certificates software-properties-common -y
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install php8.2

here is the response

$ sudo apt-get install php8.2 php8.2-fpm
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php8.2
E: Couldn't find any package by glob 'php8.2'
E: Couldn't find any package by regex 'php8.2'
E: Unable to locate package php8.2-fpm
E: Couldn't find any package by glob 'php8.2-fpm'
E: Couldn't find any package by regex 'php8.2-fpm'

答案1

得分: 3

Ubuntu 18.04(Bionic Beaver)现在已经不再支持免费更新。Ondřej Surý的PHP软件包仅适用于受支持的Ubuntu版本,因此不再适用于Ubuntu 18.04

这也在该软件库的常见问题解答中讨论过,详细说明了为什么这些文件立即不可用:

> 但这只是一个文件...
>
> 不,这绝不仅仅是一个文件。它是一个安全风险。PHP版本中经常发现安全问题,任何一个“只是一个文件”都可能积累大量的安全问题。没关系,每个软件都有漏洞,因此需要定期更新。
>
> 提供未维护的软件包只是为了“方便”是不负责任的。这也会给该软件库的维护者增加额外负担,因为除了“为什么软件包不可用”之外,还会产生“为什么软件包没有更新”的问题。
>
> 它不仅仅是一个文件。

您将需要支付扩展支持费用,或者升级到较新版本的Ubuntu。

英文:

Ubuntu 18.04 (Bionic Beaver) is now no longer supported outside of paid extended support plans. Ondřej Surý's PHP packages are only available for supported versions of Ubuntu, so are no longer available for Ubuntu 18.04.

This is also discussed in the FAQ for that repository, with details of why the files are immediately unavailable:

> But it's "just a file"...
>
> No, it's never "just a file". It's a security risk. Security issues are regularly found in PHP releases and any "just a file" might accumulate a wealth of them. That's OK, every software has bugs, and henceforth needs to be update on regular basis.
>
> It would be irresponsible to provide unmaintained packages just for "convenience". It would also create additional burden on the maintainer of this repository because instead of "why the packages are not available" this would just generate questions like "why the package are not updated".
>
> It's not "just a file".

You will have to either pay for extended support, or update to a newer version of Ubuntu.

huangapple
  • 本文由 发表于 2023年8月9日 11:22:01
  • 转载请务必保留本文链接:https://go.coder-hub.com/76864353.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定