我试图在PHP上安装最新的扩展/包版本。
我已经在PHP8.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我知道我必须指定一个版本,但这不是有办法的吗?我正在学习关于如何在我的家庭服务器上安装一个特定软件的五个单独的教程,所有这些教程都让我可以选择只安装大量的软件包--互联网上的视频教程也是如此--没有一个教员指定了一个版本,所以必须有某种解决方案。
谢谢!
发布于 2022-09-20 16:44:01
尝试此apt安装php7.4-opcache和php8 apt安装php8.1-opcache
确保在多个项目中使用多个版本时可能发生冲突,您必须将版本分配给虚拟主机。
https://stackoverflow.com/questions/73789877
复制相似问题