簡體   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