在尝试安装Amazon Linux 2上的PHP 8上的PHP磁通时,如何解决YUM安装错误(依赖关系问题)?
我正在尝试在PHP 8.0.18上使用Amazon Linux 2安装PHP模块“ Memcached”:
PHP 8.0.18 (cli) (built: May 16 2022 19:07:27) ( NTS )
Copyright (c) The PHP Group
Zend Engine v4.0.18, Copyright (c) Zend Technologies
with Zend OPcache v8.0.18, Copyright (c), by Zend Technologies
它在PHP 7.4上对我有用:
$ php -v
PHP 7.4.29 (cli) (built: May 12 2022 20:27:52) ( NTS )
Copyright (c) The PHP Group
Zend Engine v3.4.0, Copyright (c) Zend Technologies
with Zend OPcache v7.4.29, Copyright (c), by Zend Technologies
$ php -m
[PHP Modules]
[...]
memcached
[...]
我使用此命令以前安装了memcached:
sudo yum install php-memcached
当我尝试在PHP 8.0上运行此命令时.18我得到此错误:
Error: Package: php-pecl-memcached-2.2.0-1.el7.x86_64 (epel)
Requires: php(zend-abi) = 20100525-64
Installed: php-common-8.0.18-1.amzn2.x86_64 (@amzn2extra-php8.0)
php(zend-abi) = 20200930-64
Available: php-common-5.4.16-43.amzn2.x86_64 (amzn2-core)
php(zend-abi) = 20100525-64
[...]
Error: Package: php-pecl-msgpack-0.5.5-5.el7.x86_64 (epel)
Requires: php(api) = 20100412-64
Installed: php-common-8.0.18-1.amzn2.x86_64 (@amzn2extra-php8.0)
php(api) = 20200930-64
Available: php-common-5.4.16-43.amzn2.x86_64 (amzn2-core)
php(api) = 20100412-64
[...]
Error: Package: php-pecl-igbinary-1.2.1-1.el7.x86_64 (epel)
Requires: php(api) = 20100412-64
Installed: php-common-8.0.18-1.amzn2.x86_64 (@amzn2extra-php8.0)
php(api) = 20200930-64
Available: php-common-5.4.16-43.amzn2.x86_64 (amzn2-core)
php(api) = 20100412-64
要参考,这是Memcached软件包的样子:
$ sudo yum list | grep memcached
libmemcached.x86_64 1.0.16-5.amzn2.0.2 @amzn2-core
libmemcached.i686 1.0.16-5.amzn2.0.2 amzn2-core
libmemcached-devel.x86_64 1.0.16-5.amzn2.0.2 amzn2-core
memcached.x86_64 1.4.15-10.amzn2.1.2 amzn2-core
memcached-devel.x86_64 1.4.15-10.amzn2.1.2 amzn2-core
opensips-memcached.x86_64 1.10.5-4.el7 epel
php-ZendFramework-Cache-Backend-Libmemcached.noarch
php-pecl-memcached.x86_64 2.2.0-1.el7 epel
php-pecl-memcached-debuginfo.x86_64 2.2.0-1.el7 epel-debuginfo
python-memcached.noarch 1.48-4.amzn2 amzn2-core
uwsgi-router-memcached.x86_64 2.0.18-8.el7 epel
我对问题的理解是,最近发布了PHP 8支持(版本3.2.0,于2022年3月28日发布): https://github.com/php-memcached-dev/php-dev/php-memcached/发行
我的猜测是亚马逊(或Epel存储库)还没有这个新版本。
我该如何继续?我必须等待亚马逊吗?从另一个位置安装模块安全吗?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我在这里的目标是使用PHP 8安装PHP磁架模块。此模块是我以前用来与Amazon Elasticache的Memcache服务器集成的方式。
问题是该模块不在亚马逊的PHP 8存储库中。它可在PHP 7.4上使用。
我曾认为,这需要亚马逊添加此更新的模块需要时间,但是4个月已经过去了,没有任何改变。
我需要将服务器切换到PHP 8,因为PHP 7.4正在结束支持,并在此处进行了一些挖掘。事实证明,一个更好的解决方案是使用亚马逊提供的PHP群集客户端:
该链接提供了更多信息。
我能够让Memcached客户端使用此页面。
My goal here was to install the php-memcached module with PHP 8. This module was how I previously used to integrate with Amazon ElastiCache's memcache servers.
The problem was that the module was not in the PHP 8 repository on Amazon. It was available on PHP 7.4.
I had thought this would take time for Amazon to add this updated module, but 4 months have gone by and nothing has changed.
I need to switch my servers to PHP 8, as PHP 7.4 is ending support, and did some more digging here. It turns out that a better solution would be to use the PHP Cluster Client that Amazon provides:
https://docs.aws.amazon.com/AmazonElastiCache/latest/mem-ug/Appendix.PHPAutoDiscoverySetup.Installing.html#Appendix.PHPAutoDiscoverySetup.Installing.PHP7x.Ubuntu
The linked page gives more information.
I was able to get the memcached client working with this page.