我对 pecl、yum、rpm、软件包以及完成此任务所需的所有东西完全陌生,所以我希望你们中的一些更聪明、更有经验的人可以帮助我。我对自己在做什么只有一个模糊的概念。
我根据这篇文章将 PHP 5.3.3-26.el5_11 升级到 5.4.45-3.el5.remi:https://kb.odin.com/en/115833
升级后,我收到 PHP 警告:
Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
Unable to load dynamic library
undefined symbol: php_checkuid in Unknown on line 0
中描述的解决方案另一个线程是重新安装或更新扩展。
四处搜索,我尝试过以下命令:
$pecl install ldap
No releases available for package "pecl.php.net/ldap”
install failed
$ pecl upgrade ldap
No releases available for package "pecl.php.net/ldap"
install failed
$ yum update php-mcrypt
Package(s) php-mcrypt available, but not installed.
No Packages marked for Update
我在这里不知所措,当我不知道我在做什么,甚至不知道我应该位于哪个目录时,我不想继续以 root 身份运行命令。有人可以提供有关如何操作的详细信息吗?请问要这样做吗?
以下是我收到的完整警告:
PHP Warning: PHP Startup: ldap: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: mcrypt: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: Unable to load dynamic library '/usr/lib64/php/modules/odbc.so' - /usr/lib64/php/modules/odbc.so:
undefined symbol: php_checkuid in Unknown on line 0
PHP Warning: PHP Startup: PDO_ODBC: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: snmp: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: xmlrpc: Unable to initialize module
Module compiled with module API=20090626
PHP compiled with module API=20100525
These options need to match in Unknown on line 0
答案1
正确的命令是:
yum install php-module
例如,如果我需要更新 ldap,命令将是:
yum install php-ldap
这解决了所有警告。
参考http://rpms.remirepo.net/wizard/以获得更详细的说明。