在ubuntu上安装curl以使用hirak / prestissimo和composer

时间:2017-05-13 05:26:33

标签: php laravel ubuntu composer-php

我尝试安装shi / prestissimo包,因为我的作曲家非常非常慢。 我用

composer global require hirak/prestissimo

但是我收到了这个错误。我在StackOverflow上找到了另一个解决方案,但我仍然无法解决这个问题。

  Problem 1
    - Installation request for hirak/prestissimo ^0.3.6 -> satisfiable by hirak/prestissimo[0.3.6].
    - hirak/prestissimo 0.3.6 requires ext-curl * -> the requested PHP extension curl is missing from your system.

  To enable extensions, verify that they are enabled in your .ini files:
    - /etc/php/5.6/cli/php.ini
    - /etc/php/5.6/cli/conf.d/10-mysqlnd.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/15-xml.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-dom.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-gd.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-mbstring.ini
    - /etc/php/5.6/cli/conf.d/20-mcrypt.ini
    - /etc/php/5.6/cli/conf.d/20-mysql.ini
    - /etc/php/5.6/cli/conf.d/20-mysqli.ini
    - /etc/php/5.6/cli/conf.d/20-pdo_mysql.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-simplexml.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
    - /etc/php/5.6/cli/conf.d/20-wddx.ini
    - /etc/php/5.6/cli/conf.d/20-xmlreader.ini
    - /etc/php/5.6/cli/conf.d/20-xmlwriter.ini
    - /etc/php/5.6/cli/conf.d/20-xsl.ini

谢谢大家!

4 个答案:

答案 0 :(得分:7)

curl不会留在php.ini

对于ubuntu,您需要从终端

安装它

像这样安装

sudo apt-cache search php-curl

 sudo apt-get install php(version of php you are using)-curl

答案 1 :(得分:0)

到目前为止,这是cURL问题。您必须安装cURL并启用它。
sudo apt-cache search php-curl并从那里获取您的版本号。通过键入sudo apt-get install php5.6-curl进行安装。这应该有用。

答案 2 :(得分:0)

运行此命令sudo apt-get install php5-intl

之后运行此sudo apt-get update && sudo apt-get upgrade

如果这不起作用,请检查您的依赖项是否有错误。它可以在输入sudo apt-get install php5之后使用此终端tab进行检查。然后您可以看到包。

答案 3 :(得分:0)

试试吧

sudo apt-get install php5.6-bcmath