7

When attempting to create a new Laravel project (with Laravel.phar, on Ubuntu 12.04):

laravel new myproject

I get the following error:

Crafting application...

[Guzzle\Common\Exception\RuntimeException]               
The PHP cURL extension must be installed to use Guzzle.  

new name

PHP's cURL (and all related packages I could find by googling this issue) is installed and enabled.

The first few lines of phpinfo()'s cURL section is:

cURL support    enabled
cURL Information    7.22.0
Age 3

I can't quite figure out what's going wrong here. Thanks in advance!

mathiscode
  • 1,509
  • 3
  • 13
  • 10

2 Answers2

13

The PHP cURL extension package needs to install. Run this command to install the package:

sudo apt-get install php5.6-curl

Then run:

laravel new myproject

thmspl
  • 2,437
  • 3
  • 22
  • 48
errakeshpd
  • 2,544
  • 2
  • 28
  • 35
5

PHP usually has two different configuration files. One is for running embedded inside the webserver. The other one is when called on the command line.

Make sure you look into the right phpinfo. Run php -i on the command line to see the installed extensions of that version, and also see where the configuration file is located to change the installed extensions.

Sven
  • 69,403
  • 10
  • 107
  • 109
  • 3
    See http://stackoverflow.com/questions/2939820/how-to-enable-curl-installed-ubuntu-lamp-stack to install PHP5-Curl in Apache, for those who didn't know how to do so... – Erik Mar 07 '14 at 18:11
  • sudo apt-get install php5-curl – Midhun KM Jul 21 '14 at 11:22