繁体   English   中英

php5-curl没有安装在Ubuntu 14.04上

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

我已执行以下操作

sudo apt-get install php5-curl

结果是

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#

但是,当我尝试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

我不知道您是否找到了解决问题的方法,但无论如何,它可能对其他人有所帮助。 我是在同样的情况,并希望为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

尝试安装所需的依赖项

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

在这个重新启动apache之后

sudo service apache2 restart
or
sudo service httpd restart

确保已启用扩展程序。

cd /etc/php5/apache2/

sudo nano php.ini

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

然后再次重启apache

暂无
暂无

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

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