ext-curl * - >缺少请求的PHP扩展卷曲 - 安装pusher / pusher-http-laravel Package

时间:2017-12-28 11:19:21

标签: php laravel curl laravel-5.4

我开发了一个带有实时通知的Laravel项目,因此我正在使用pusher / pusher-http-laravel Package。

当我通过作曲家安装这个packgae时,它会显示以下错误。

Problem 1
    - pusher/pusher-php-server v3.0.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - pusher/pusher-php-server 3.0.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
    - pusher/pusher-http-laravel v4.0.0 requires pusher/pusher-php-server ^3.0 -> satisfiable by pusher/pusher-php-server[3.0.0, v3.0.1].
    - Installation request for pusher/pusher-http-laravel ^4.0 -> satisfiable by pusher/pusher-http-laravel[v4.0.0].

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/7.0/cli/php.ini
    - /etc/php/7.0/cli/conf.d/10-mysqlnd.ini
    - /etc/php/7.0/cli/conf.d/10-opcache.ini
    - /etc/php/7.0/cli/conf.d/10-pdo.ini
    - /etc/php/7.0/cli/conf.d/15-xml.ini
    - /etc/php/7.0/cli/conf.d/20-calendar.ini
    - /etc/php/7.0/cli/conf.d/20-ctype.ini
    - /etc/php/7.0/cli/conf.d/20-dom.ini
    - /etc/php/7.0/cli/conf.d/20-exif.ini
    - /etc/php/7.0/cli/conf.d/20-fileinfo.ini
    - /etc/php/7.0/cli/conf.d/20-ftp.ini
    - /etc/php/7.0/cli/conf.d/20-gd.ini
    - /etc/php/7.0/cli/conf.d/20-gettext.ini
    - /etc/php/7.0/cli/conf.d/20-iconv.ini
    - /etc/php/7.0/cli/conf.d/20-intl.ini
    - /etc/php/7.0/cli/conf.d/20-json.ini
    - /etc/php/7.0/cli/conf.d/20-mbstring.ini
    - /etc/php/7.0/cli/conf.d/20-mysqli.ini
    - /etc/php/7.0/cli/conf.d/20-pdo_mysql.ini
    - /etc/php/7.0/cli/conf.d/20-phar.ini
    - /etc/php/7.0/cli/conf.d/20-posix.ini
    - /etc/php/7.0/cli/conf.d/20-readline.ini
    - /etc/php/7.0/cli/conf.d/20-shmop.ini
    - /etc/php/7.0/cli/conf.d/20-simplexml.ini
    - /etc/php/7.0/cli/conf.d/20-sockets.ini
    - /etc/php/7.0/cli/conf.d/20-sysvmsg.ini
    - /etc/php/7.0/cli/conf.d/20-sysvsem.ini
    - /etc/php/7.0/cli/conf.d/20-sysvshm.ini
    - /etc/php/7.0/cli/conf.d/20-tokenizer.ini
    - /etc/php/7.0/cli/conf.d/20-wddx.ini
    - /etc/php/7.0/cli/conf.d/20-xmlreader.ini
    - /etc/php/7.0/cli/conf.d/20-xmlwriter.ini
    - /etc/php/7.0/cli/conf.d/20-xsl.ini
  You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

在我的系统环境中,我已经启用了CURL扩展

enter image description here

如何解决此错误。我的php版本是5.6

3 个答案:

答案 0 :(得分:1)

如果你是更新larval版本,一定要更新php版本,然后需要安装/启用php curl。

在 ubuntu 上你可以运行这个 cmd apt-get install php7.4-curl。确保替换为正确的 php 版本。 (如果你运行 php -v 会给出 php 版本)

然后重新启动apache,这应该可以解决问题。

答案 1 :(得分:0)

如果无法将PHP版本从5.6升级到7,则需要在composer.json文件中将Laravel版本降级为5.1。

"require" : {
    "laravel/framework" : "5.1.*",

答案 2 :(得分:0)

由于我的Laravel版本和PHP版本,此问题引发。我修复了错误安装pusher / pusher-http-laravel 3.0.0版。