Friday, June 20, 2014

Laravel The PHP cURL extension must be installed to use Guzzle

Most of the webposts are inaccurate. Nobody uses this for web development anymore.

The webposts which say to uncomment

in php.ini are wrong. You still get an error message 
no-debug-non-zts-20121212 not found. This means the php install libcurl option was not enabled during compile. 

dc@localhost ~]$ laravel new blog
Crafting application...

  The PHP cURL extension must be installed to use Guzzle.

new name

If you are installing php from the source code, configure with libcurl option. And make sure you installed libcurl-devel. 

>sudo yum install libxml2-devel
>sudo yum install libcurl-devel
Verify you see the curl.h headers under /usr/include/curl

dc@localhost ~]$ ls /usr/include/curl
curlbuild-64.h  curl.h       curlver.h  mprintf.h  stdcheaders.h    types.h
curlbuild.h     curlrules.h  easy.h     multi.h    typecheck-gcc.h

>cd into the php 5.5.13 directory

[dc@localhost php-5.5.13]$ ./configure --with-curl
...output omittedc

>[dc@localhost php-5.5.13]$ sudo make install
Installing shared extensions:     /usr/local/lib/php/extensions/no-debug-non-zts-20121212/
Installing PHP CLI binary:        /usr/local/bin/
Installing PHP CLI man page:      /usr/local/php/man/man1/
Installing PHP CGI binary:        /usr/local/bin/
Installing PHP CGI man page:      /usr/local/php/man/man1/
Installing build environment:     /usr/local/lib/php/build/
Installing header files:          /usr/local/include/php/
Installing helper programs:       /usr/local/bin/
  program: phpize
  program: php-config
Installing man pages:             /usr/local/php/man/man1/
  page: phpize.1
  page: php-config.1
Installing PEAR environment:      /usr/local/lib/php/
[PEAR] Archive_Tar    - already installed: 1.3.11
[PEAR] Console_Getopt - already installed: 1.3.1
[PEAR] PEAR           - already installed: 1.9.4
Wrote PEAR system config file at: /usr/local/etc/pear.conf
You may want to add: /usr/local/lib/php to your php.ini include_path
[PEAR] Structures_Graph- already installed: 1.0.4
[PEAR] XML_Util       - already installed: 1.2.1
/home/dc/Downloads/php-5.5.13/build/shtool install -c ext/phar/phar.phar /usr/local/bin
ln -s -f /usr/local/bin/phar.phar /usr/local/bin/phar
Installing PDO headers:          /usr/local/include/php/ext/pdo/

No comments:

Post a Comment