[英]Install PHP modules on CentOS
I'm trying to install PHP 5.5.21 on CentOS 7.0. 我正在尝试在CentOS 7.0上安装PHP 5.5.21。 When I execute php -v
I get about 10 modules errors like this one: 当我执行php -v
我得到大约10个模块错误,如下所示:
PHP Warning: PHP Startup: curl: Unable to initialize module
Module compiled with module API=20100525
PHP compiled with module API=20121212
I tryed to install or update package with pecl install curl
and pecl upgrade curl
But pecl always responds : 我尝试使用pecl install curl
和pecl upgrade curl
安装或更新包但是pecl总是响应:
No releases available for package "pecl.php.net/curl"
And yum install php-curl
says: 和yum install php-curl
说:
Package php-common-5.4.16-23.el7_0.3.x86_64 already installed and latest version
Nothing to do
How can I do to fix modules error? 如何修复模块错误?
Try running: find / -name curl.so
尝试运行: find / -name curl.so
Then copy the directory it finds curl.so
in and create a symbolic link to it where the rest of your working .so files are stored: 然后复制它找到curl.so
的目录并创建一个符号链接,以便存储其余的工作.so文件:
cd <where your working .so files are>
ln -s <where curl.so is> curl.so
Then edit your php.ini
file and enable the extension: 然后编辑您的php.ini
文件并启用扩展名:
extension=curl.so
Restart apache: 重启apache:
service httpd restart
service apache2 restart `#If the service is named apache2 rather than httpd`
This resolved my problem when I had a similar issue. 当我遇到类似问题时,这解决了我的问题。
我终于解决了我的问题,删除自定义PHP安装并使用本教程安装PHP 5.5
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.