[英]PHP - How to install the latest version of package?
I am trying to install the latest extension/package version on PHP.我正在尝试在 PHP 上安装最新的扩展/包版本。
I have tried the following on both PHP 8.1 and 7.4 and I am getting the same type of error:我在 PHP 8.1 和 7.4 上都尝试了以下操作,我得到了相同类型的错误:
sudo apt install php-opcache
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package php-opcache is a virtual package provided by:
php8.2-opcache 8.2.0~rc1-2+ubuntu22.04.1+deb.sury.org+1
php8.1-opcache 8.1.10-2+ubuntu22.04.1+deb.sury.org+1
php8.0-opcache 1:8.0.23-1+ubuntu22.04.1+deb.sury.org+1
php7.4-opcache 1:7.4.30-6+ubuntu22.04.1+deb.sury.org+1
php7.3-opcache 7.3.33-6+ubuntu22.04.1+deb.sury.org+1
php7.2-opcache 7.2.34-34+ubuntu22.04.1+deb.sury.org+1
php7.1-opcache 7.1.33-49+ubuntu22.04.1+deb.sury.org+1
php7.0-opcache 7.0.33-62+ubuntu22.04.1+deb.sury.org+1
php5.6-opcache 5.6.40-62+ubuntu22.04.1+deb.sury.org+1
You should explicitly select one to install.
E: Package 'php-opcache' has no installation candidate
I know that I must specify a version, but isn't there some way around this?我知道我必须指定一个版本,但是没有办法解决这个问题吗? I am follwoing FIVE separate tutorials on how to install a particular software on my home server and ALL of them are giving me the option to just install a bulk list of packages - same for the video tutorials around the Internet - not a single one of the instructors are specifying a version - so there must be some kind of solution.
我正在学习关于如何在我的家庭服务器上安装特定软件的五个单独的教程,所有这些教程都让我可以选择只安装大量的软件包 - 与互联网上的视频教程相同 - 而不是一个讲师正在指定一个版本-因此必须有某种解决方案。
Thank you!谢谢!
try this apt install php7.4-opcache and for php8 apt install php8.1-opcache试试这个 apt install php7.4-opcache 和 php8 apt install php8.1-opcache
be sure conflicts maybe occurred when using multiple version with multiple project you have to assign version to virtual host确保在多个项目中使用多个版本时可能会发生冲突,您必须将版本分配给虚拟主机
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.