How do I install the ext-curl extension with PHP 7?

后端 未结 12 731
终归单人心
终归单人心 2020-11-29 17:37

I\'ve installed PHP 7 using this repo, but when I try to run composer install, it\'s giving this error:

  • [package] requires ext-cu
相关标签:
12条回答
  • 2020-11-29 18:15

    please try

    sudo apt-get install php7.0-curl
    
    0 讨论(0)
  • 2020-11-29 18:15

    If you are using PHP7.1 ( try php -version to find your PHP version)

    sudo apt-get install php7.1-curl
    

    then restart apache

    sudo service apache2 restart
    
    0 讨论(0)
  • 2020-11-29 18:17

    We can install any PHP7 Extensions which we are needed at the time of install Magento just use related command which you get error at the time of installin Magento

    sudo apt-get install php7.0-curl
    sudo apt-get install php7.0-dom
    sudo apt-get install php7.0-mcrypt
    sudo apt-get install php7.0-simplexml
    sudo apt-get install php7.0-spl
    sudo apt-get install php7.0-xsl
    sudo apt-get install php7.0-intl
    sudo apt-get install php7.0-mbstring
    sudo apt-get install php7.0-ctype
    sudo apt-get install php7.0-hash
    sudo apt-get install php7.0-openssl
    sudo apt-get install php7.0-zip
    sudo apt-get install php7.0-xmlwriter
    sudo apt-get install php7.0-gd
    sudo apt-get install php7.0-iconv
    

    Thanks! Hope this will help you

    0 讨论(0)
  • 2020-11-29 18:19

    I tried the above solutions but it didn't work for me, just incase there any other person in the same shoes, this is what I did. I updated apt-get with the following command

    sudo add-apt-repository ppa:ondrej/php
    

    this i installed with php curl for the version of php that i was using, mine was

    sudo apt-get install php7.1-curl
    
    0 讨论(0)
  • 2020-11-29 18:21

    First Login to your server and check the PHP version which is installed on your server.

    And then run the following commands:

    sudo apt-get install php7.2-curl
    
    sudo service apache2 restart
    

    Replace the PHP version ( php7.2 ), with your PHP version.

    0 讨论(0)
  • 2020-11-29 18:21

    Windows users:

    Note: Note to Win32 Users In order to enable this module on a Windows environment, libeay32.dll and ssleay32.dll, or, as of OpenSSL 1.1 libcrypto-.dll and libssl-.dll, must be present in your PATH. Also libssh2.dll must be present in your PATH. You don't need libcurl.dll from the cURL site.

    https://www.php.net/manual/en/curl.installation.php

    Add your C:\wamp\bin\php\php7.1.15 to your PATH

    Restart all services

    0 讨论(0)
提交回复
热议问题