我试图在FC5上从源代码中安装FC5,一切都很好地配置和编译。但是,当我尝试运行php时,我会收到以下错误。
PHP Warning: PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: mysqli: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: gd: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match
in Unknown on line 0
PHP Warning: PHP Startup: ldap: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: mysql: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: mysqli: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: PDO: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: pdo_mysql: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0
These options need to match in Unknown on line 0
PHP Warning: PHP Startup: pdo_sqlite: Unable to initialize module
Module compiled with module API=20050922, debug=0, thread-safety=0
PHP compiled with module API=20060613, debug=0, thread-safety=0我使用以下选项配置了PHP:
./configure --with-mysql --with-gd --enable-modules=php5 -with-zlib --enable-pdo=shared --with-pdo-sqlite=shared --with-sqlite=shared谁知道这是怎么回事。我知道是模块不是正确的版本,但我不知道如何纠正这一点。
如何才能使它正确安装?
发布于 2009-07-03 15:24:20
发布于 2009-07-03 11:07:19
您是否首先删除了旧的PHP?看起来有些旧库仍然存在,新的PHP二进制文件正在尝试访问它们。
我不太愿意在基于RPM的发行版上从源代码中构建软件包,除非最终生成一个我可以安装的RPM。我的观点是,非基于RPM的安装在这样的机器上只是“粘稠”机器。
看起来雷米·科莱特正在为php-5和模块维护一些最近的RPM(实际上,几天前他刚刚为一堆Fedora发行版构建了PHP-5.3,但他在6!见:http://blog.famillecollet.com/post/2009/06/30/PHP-5.3.0-Released)。
我想看看他的RPM是否能做你想做的事情(http://rpms.famillecollet.com/fedora/5/或镜子)。如果您真的想从源代码编译(因为您可能想要really提供的更新的版本),我会从Remi的站点下载SRPM,安装它们,修改.specfiles以引用更新的版本,并使用他的.specfiles进行构建。(它可能在第一次不起作用,但是您应该能够找出破坏构建的更改,它将给您一些使用RPM的良好经验)。
您甚至可能会发现,他的用于FC6的PHP-5.3RPM在FC5上安装良好。
我定期为软件构建RPM包,以便安装到多台基于RPM的机器上(通常是CentOS)。从RPM安装新软件意味着我的“生产”机器保持干净,不需要安装编译器。这是我强烈推荐的策略。
发布于 2009-07-03 13:39:08
你为什么还在运行Fedora Core 5?我建议切换到支持寿命更长的东西,比如CentOS 5(顺便说一句,它有PHP5.1开箱)。你在运行Fedora三年前的版本,所以它已经过了两年了.
https://serverfault.com/questions/35487
复制相似问题