Ubuntu pecl install pecl_http fail

前端 未结 6 1725
时光取名叫无心
时光取名叫无心 2020-12-17 10:16

I\'m trying to install this extension but it fails in the configuration phase. I\'m on ubuntu 12.04 and I have just installed these packages:

  • libcurl3-openssl-
6条回答
  •  一个人的身影
    2020-12-17 10:29

    On Ubuntu 12.04.5 LTS this worked for me:

    First install some prerequisites needed for compilation:

    sudo apt-get install php-http
    sudo apt-get install php5-dev
    sudo apt-get install libcurl3
    sudo apt-get install libpcre3-dev
    sudo apt-get install libcurl4-openssl-dev
    sudo pecl install raphf 
    sudo pecl install pecl_http-1.7.6
    

    after that go to the folder /usr/lib/php5/modules and check if the libraries are there: raphf.so, propro.so and http.so.

    If your php.ini (at /etc/php5/apache2/php.ini and /etc/php5/cli/php.ini) does not contain these extensions, add them:

    extension=http.so
    extension=propro.so
    extension=raphf.so
    

    or using the absolute path to the files, e.g. extension=/usr/lib/php5/modules/http.so.

    And as last step restart your webserver, thus loading the new configuration:

    sudo service apache2 reload
    

提交回复
热议问题