我有一个带内容的composer.json:
{
"require":{
"paypal/rest-api-sdk-php": "*"
}
}
尝试通过以下命令composer install
安装作曲家,
我收到此错误消息:
您的要求无法解析为可安装的软件包。
完整的错误日志:
Problem 1
- paypal/rest-api-sdk-php v1.7.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.6.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.6.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.6.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.6.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.6.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.5.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.5.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.4.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.3.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.3.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.3.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.2.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.2.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.1.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.1.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v1.0.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.9.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.8.6 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.8.5 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.8.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.8.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.8.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.8.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.8.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.7.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.7.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.6.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.16.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.16.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.15.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.15.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.14.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.14.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.14.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.13.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.13.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.13.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.12.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.11.1 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.11.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php v0.10.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php V0.5.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php 1.9.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php 1.8.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php 1.7.4 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php 1.7.3 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php 1.7.2 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php 1.11.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- paypal/rest-api-sdk-php 1.10.0 requires ext-curl * -> the requested PHP extension curl is missing from your system.
- Installation request for paypal/rest-api-sdk-php * -> satisfiable by paypal/rest-api-sdk-php[1.10.0, 1.11.0, 1.7.2, 1.7.3, 1.7.4, 1.8.0, 1.9.0, V0.5.0, v0.10.0, v0.11.0, v0.11.1, v0.12.0, v0.13.0, v0.13.1, v0.13.2, v0.14.0, v0.14.1, v0.14.2, v0.15.0, v0.15.1, v0.16.0, v0.16.1, v0.6.0, v0.7.0, v0.7.1, v0.8.0, v0.8.1, v0.8.2, v0.8.3, v0.8.4, v0.8.5, v0.8.6, v0.9.0, v1.0.0, v1.1.0, v1.1.1, v1.2.0, v1.2.1, v1.3.0, v1.3.1, v1.3.2, v1.4.0, v1.5.0, v1.5.1, v1.6.0, v1.6.1, v1.6.2, v1.6.3, v1.6.4, v1.7.0, v1.7.1].
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/20-calendar.ini
- /etc/php/7.0/cli/conf.d/20-ctype.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-gettext.ini
- /etc/php/7.0/cli/conf.d/20-iconv.ini
- /etc/php/7.0/cli/conf.d/20-json.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-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
You can also run php --ini inside terminal to see which files are used by PHP in CLI mode.
我对此很陌生。我在这里缺少什么?
答案 0 :(得分:5)
在您的php安装 curl 扩展名中丢失。您需要运行以下命令安装它:
sudo apt-get install php7.0-curl
之后,这个错误就会消失。