¿Cómo instalo la extensión ext-curl con PHP 7?
He instalado PHP 7 usando este repositorio , pero cuando intento ejecutar composer install
, está dando este error:
- [package] requires ext-curl * -> la extensión PHP solicitada curl no está en su sistema.
Con PHP 5, puede instalarlo fácilmente ejecutando el comando yum
o apt-get install php5-curl
, pero no puedo encontrar cómo instalar el equivalente de PHP 7.
¿Cómo instalo ext-curl para PHP 7?
7 answers
Bueno, pude instalarlo por:
sudo apt-get install php-curl
En mi sistema. Esto instalará un paquete de dependencias, que depende de la versión predeterminada de php.
Después de eso reinicie apache
sudo service apache2 restart
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-02-01 12:13:43
Por favor intente
sudo apt-get install php7.0-curl
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-07-12 03:08:56
Si el comando "sudo apt-get install php-curl" no funciona y muestra un error Debemos ejecutar este código antes de instalar curl.
- step1 - sudo add-apt-repository ppa: ondrej / php
- step2 - sudo apt-get update
- step3 - sudo apt-get install php-curl
- step4-sudo service apache2 restart
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-12-18 16:45:12
Podemos instalar cualquier extensión PHP7 que se necesite en el momento de instalar Magento solo use el comando relacionado que obtiene error en el momento de instalar 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
Gracias! Espero que esto te ayude
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-04-25 11:18:45
Probé las soluciones anteriores, pero no funcionó para mí, solo en caso de que haya otra persona en los mismos zapatos, esto es lo que hice. He actualizado apt-get con el siguiente comando
sudo add-apt-repository ppa:ondrej/php
Esto lo instalé con php curl para la versión de php que estaba usando, la mía fue
sudo apt-get install php7.1-curl
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2018-08-19 06:55:52
Install php70w-common.
Proporciona php api php-bz2, php-calendario, php-ctype, php-curl de php-fecha, php-exif, php-fileinfo, php-filtro, php, ftp, php-gettext, php-gmp, php-hash, php-iconv, php, json, php-libxml, php-openssl, php-pcre, php-pecl-Fileinfo, php-pecl-phar, php-pecl-zip, php-reflexión, php sesiones en php-shmop, php simplexml, php-sockets, php-spl, php-tokenizer, php-zend-abi, php-zip, php-zlib .
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2015-11-18 09:18:28
Pruébelo si obtiene E: Unable to locate package {packageName}
sudo add-apt-repository main
sudo add-apt-repository universe
sudo add-apt-repository restricted
sudo add-apt-repository multiverse
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php-curl
Warning: date(): Invalid date.timezone value 'Europe/Kyiv', we selected the timezone 'UTC' for now. in /var/www/agent_stack/data/www/ajaxhispano.com/template/agent.layouts/content.php on line 61
2016-09-01 08:21:56