【问题标题】:Unable to download the pecl install gearman on Ubuntu无法在 Ubuntu 上下载 pecl install gearman
【发布时间】:2020-07-09 14:02:00
【问题描述】:

我正在尝试在 Ubuntu 上设置 gearman,安装失败并显示以下错误。

PHP Warning:  PHP Startup: Unable to load dynamic library 'gearman.so' (tried: /usr/lib/php/20170718/gearman.so (/usr/lib/php/20170718/gearman.so: cannot open shared object file: No such file or directory), /usr/lib/php/20170718/gearman.so.so (/usr/lib/php/20170718/gearman.so.so: cannot open shared object file: No such file or directory)) in Unknown on line 0
WARNING: channel "pecl.php.net" has updated its protocols, use "pecl channel-update pecl.php.net" to update
pecl/gearman requires PHP (version >= 5.1.0, version <= 6.0.0, excluded versions: 6.0.0), installed version is 7.2.24-0ubuntu0.18.04.6
No valid packages found
install failed

【问题讨论】:

  • 请提供更多详细信息。来自review

标签: php ubuntu gearman


【解决方案1】:

该消息详细说明了它正在寻找 gearman.so 文件的位置 - 将它放在这些位置之一,它应该可以工作。

不过,http://pecl.php.net/package/gearman 的最新版本已经为 Ubuntu 打包,所以我更愿意用 apt 安装它。这就是我在 Ubuntu 20.04 上得到的:

$ sudo apt install php-gearman
$ echo '<?php print gearman_version() . "\n"; ?>' > gearman_test.php
$ php gearman_test.php
1.1.18+ds

【讨论】:

    猜你喜欢
    • 2013-01-31
    • 2013-12-15
    • 2016-10-27
    • 2016-01-05
    • 2016-11-03
    • 2022-07-22
    • 2018-08-14
    • 1970-01-01
    • 2011-05-08
    相关资源
    最近更新 更多