作曲家安装缺失的卷发



我正在ubuntu上开发一些PHP 14.04.4 ls。运行composer install失败了,我无法弄清楚。当我使用PHP 5.5.9时,这是更早的工作,但是我必须更新至5.6才能安装Phpunit。

运行php -v输出:

PHP 5.6.23-1+deb.sury.org~trusty+2 (cli) 
Copyright (c) 1997-2016 The PHP Group
Zend Engine v2.6.0, Copyright (c) 1998-2016 Zend Technologies
with Zend OPcache v7.0.6-dev, Copyright (c) 1999-2016, by Zend Technologies

运行which php输出:

/usr/bin/php

是一种可疑的,因为它与php -v不匹配(/usr/bin具有:" php"," php5"one_answers" php5.6")

这是我的作曲家:

{
    "require-dev": {
        "phpunit/phpunit": "5.4.*"
    },
    "require": {
        "silex/silex": "~1.3",
        "stripe/stripe-php": "3.*"
    }
}

运行composer install创建此输出:

$ composer install
Loading composer repositories with package information
Updating dependencies (including require-dev)
Your requirements could not be resolved to an installable set of packages.
  Problem 1
- stripe/stripe-php v3.9.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.9.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.9.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.8.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.7.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.6.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.5.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.4.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.2.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.14.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.14.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.14.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.14.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.13.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.12.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.12.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.11.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.10.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.10.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.1.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.0.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- stripe/stripe-php v3.14.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- Installation request for stripe/stripe-php 3.* -> satisfiable by stripe/stripe-php[v3.0.0, v3.1.0, v3.10.0, v3.10.1, v3.11.0, v3.12.0, v3.12.1, v3.13.0, v3.14.0, v3.14.1, v3.14.2, v3.14.3, v3.2.0, v3.3.0, v3.4.0, v3.5.0, v3.6.0, v3.7.0, v3.7.1, v3.8.0, v3.9.0, v3.9.1, v3.9.2].
To enable extensions, verify that they are enabled in those .ini files:
- /etc/php/5.6/cli/php.ini
- /etc/php/5.6/cli/conf.d/10-opcache.ini
- /etc/php/5.6/cli/conf.d/10-pdo.ini
- /etc/php/5.6/cli/conf.d/20-calendar.ini
- /etc/php/5.6/cli/conf.d/20-ctype.ini
- /etc/php/5.6/cli/conf.d/20-exif.ini
- /etc/php/5.6/cli/conf.d/20-fileinfo.ini
- /etc/php/5.6/cli/conf.d/20-ftp.ini
- /etc/php/5.6/cli/conf.d/20-gettext.ini
- /etc/php/5.6/cli/conf.d/20-iconv.ini
- /etc/php/5.6/cli/conf.d/20-json.ini
- /etc/php/5.6/cli/conf.d/20-phar.ini
- /etc/php/5.6/cli/conf.d/20-posix.ini
- /etc/php/5.6/cli/conf.d/20-readline.ini
- /etc/php/5.6/cli/conf.d/20-shmop.ini
- /etc/php/5.6/cli/conf.d/20-sockets.ini
- /etc/php/5.6/cli/conf.d/20-sysvmsg.ini
- /etc/php/5.6/cli/conf.d/20-sysvsem.ini
- /etc/php/5.6/cli/conf.d/20-sysvshm.ini
- /etc/php/5.6/cli/conf.d/20-tokenizer.ini
You can also run `php --ini` inside terminal to see which files are used by PHP in CLI mode.

我遵循以下说明,但它不起作用:作曲家安装错误 - 实际启用时需要ext_curl

运行php -i | grep php.ini输出:

Configuration File (php.ini) Path => /etc/php/5.6/cli
Loaded Configuration File => /etc/php/5.6/cli/php.ini

运行:sudo apt-get install php5-curl输出:

php5-curl is already the newest version.

运行curl -V输出:

curl 7.35.0 (x86_64-pc-linux-gnu) libcurl/7.35.0 OpenSSL/1.0.1f zlib/1.2.8 libidn/1.28 librtmp/2.3
Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp smtp smtps telnet tftp 
Features: AsynchDNS GSS-Negotiate IDN IPv6 Largefile NTLM NTLM_WB SSL libz TLS-SRP 

任何帮助都将不胜感激。

执行此操作: sudo apt-get install php-curl

一些注释:

  • 运行php -i很好。它向您显示了使用的php.ini,因此您知道要编辑哪个文件。
  • 不需要运行curl -v,因为这是在CLI上使用的独立卷曲,并且与PHP扩展卷曲无关。
  • 您检查了php5-curl,这是所需的软件包。好。

缺少什么?您需要确保扩展名也由PHP加载!

编辑您的/etc/php/5.6/cli/php.ini,搜索extension,寻找php_curl并启用:extension=php_curl.so

然后在CLI上运行php -m,以查看已加载模块的列表并确保加载卷发。

最后,重新运行您的composer install

如果Ubuntu不是服务器版本,并且使用tasksel安装Web服务器尝试安装PHP apt-get install php

相关内容

  • 没有找到相关文章

最新更新