[英]Install PHP modules on CentOS
我正在嘗試在CentOS 7.0上安裝PHP 5.5.21。 當我執行php -v
我得到大約10個模塊錯誤,如下所示:
PHP Warning: PHP Startup: curl: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
我嘗試使用pecl install curl
和pecl upgrade curl
安裝或更新包但是pecl總是響應:
No releases available for package "pecl.php.net/curl"
和yum install php-curl
說:
Package php-common-5.4.16-23.el7_0.3.x86_64 already installed and latest version
Nothing to do
如何修復模塊錯誤?
嘗試運行: find / -name curl.so
然后復制它找到curl.so
的目錄並創建一個符號鏈接,以便存儲其余的工作.so文件:
cd <where your working .so files are>
ln -s <where curl.so is> curl.so
然后編輯您的php.ini
文件並啟用擴展名:
extension=curl.so
重啟apache:
service httpd restart
service apache2 restart `#If the service is named apache2 rather than httpd`
當我遇到類似問題時,這解決了我的問題。
我終於解決了我的問題,刪除自定義PHP安裝並使用本教程安裝PHP 5.5
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.