2014-02-08 33 views
7

當試圖創建一個新的Laravel項目(與Laravel.phar,在Ubuntu 12.04):使用Laravel,狂飲抱怨說,PHP cURL擴展未安裝

laravel new myproject 

我得到以下錯誤:

Crafting application... 

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

new name 

PHP的捲曲(和所有相關的包通過google搜索這個問題,我能找到)安裝並啓用。

的phpinfo的前幾行()的捲翹部是:

cURL support enabled 
cURL Information 7.22.0 
Age 3 

我不能完全弄清楚發生了什麼事情錯在這裏。提前致謝!

+0

你收到來自CLI的phpinfo? – PeeHaa

回答

5

PHP通常有兩個不同的配置文件。一個是運行嵌入在網絡服務器內部。另一個是在命令行上調用的時候。

確保您查看了正確的phpinfo。在命令行上運行php -i以查看該版本的已安裝擴展,並查看配置文件的位置以更改已安裝的擴展。

+3

請參閱http://stackoverflow.com/questions/2939820/how-to-enable-curl-installed-ubuntu-lamp-stack在Apache中安裝PHP5-Curl,對於那些不知道如何去做的人.. 。 – Erik

+0

sudo apt-get install php5-curl – KrIsHnA

12

需要安裝PHP cURL擴展包。 運行此命令來安裝軟件包。

sudo apt-get install PHP5-Curl

然後運行「laravel新的myproject」

+0

sudo apt-get install curl libcurl3 libcurl3-dev php5-curl – KrIsHnA

+0

@KrIsHnA這個問題只是由於php5-curl包。 – errakeshpd

+1

現在使用'sudo apt-get install php-curl' :) –