简体   繁体   English

php5-curl没有安装在Ubuntu 14.04上

[英]php5-curl not getting installed on Ubuntu 14.04

I have execute the below 我已执行以下操作

sudo apt-get install php5-curl

result was 结果是

root@digin-demo-app:/var/www/html# sudo apt-get install php5-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
php5-curl is already the newest version.
The following packages were automatically installed and are no longer required:
  libgcrypt11-dev libgnutls-dev libgnutlsxx27 libgpg-error-dev libp11-kit-dev
  librtmp-dev libtasn1-6-dev
Use 'apt-get autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.
root@digin-demo-app:/var/www/html#

But when i try php -m command it shows only below modules.Kindly help me on this 但是,当我尝试php -m命令时,它只显示在modules下面。请在此帮助我

root@digin-demo-app:/var/www/html# php -m
[PHP Modules]
calendar
Core
ctype
date
ereg
exif
fileinfo
filter
ftp
gettext
hash
iconv
json
libxml
mhash
openssl
pcntl
pcre
PDO
Phar
posix
readline
Reflection
session
shmop
sockets
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
Zend OPcache
zlib

[Zend Modules]
Zend OPcache

I don't know if you found a solution to your issue, but anyway, it may help someone else. 我不知道您是否找到了解决问题的方法,但无论如何,它可能对其他人有所帮助。 I was in the same situation and wanted to install curl for php5.6 I used the same command as yours but didn't work until I found this on some forums 我是在同样的情况,并希望为php5.6安装curl我使用与你的相同的命令,但直到我在一些论坛上发现这个没有工作

sudo apt-get install php5.6-curl php5.6-gd php5.6-mbstring php5.6-mcrypt php5.6-xml php5.6-xmlrpc

Try with install required dependency 尝试安装所需的依赖项

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

after this restart apache 在这个重新启动apache之后

sudo service apache2 restart
or
sudo service httpd restart

Make sure the extension is enabled. 确保已启用扩展程序。

cd /etc/php5/apache2/

sudo nano php.ini

add this command: extension=curl.so 添加以下命令: extension=curl.so

then restart apache again 然后再次重启apache

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM