Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Using Laravel, Guzzle complains that the PHP cURL extension isn't installed

Tags:

php

curl

ubuntu

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!

like image 872
mathiscode Avatar asked Feb 08 '14 03:02

mathiscode


2 Answers

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

like image 83
errakeshpd Avatar answered Sep 22 '22 10:09

errakeshpd


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.

like image 32
Sven Avatar answered Sep 21 '22 10:09

Sven