简体   繁体   English

PHP不编译扩展/模块?

[英]PHP not compiling extensions / modules?

I'm trying to install PHP 5.4 on a CentOS 6 x64 machine. 我正在尝试在CentOS 6 x64计算机上安装PHP 5.4。

Currently I have 5.3.18 along with a few other things such as nginx/FPM installed from a repo, but I need 5.4 for a specific project. 目前,我已经安装了5.3.18以及其他一些东西,例如从存储库中安装了nginx / FPM,但是对于特定项目,我需要5.4.18。

I'm currently compiling with options: 我目前正在编译选项:

./configure --host=x86_64-unknown-linux-gnu --build=x86_64-unknown-linux-gnu --program-prefix= --prefix=/usr --exec-prefix=/usr --bindir=/usr/bin --sbindir=/usr/sbin --sysconfdir=/etc --datadir=/usr/share --includedir=/usr/include --libdir=/usr/lib64 --libexecdir=/usr/libexec --localstatedir=/var --sharedstatedir=/var/lib --mandir=/usr/share/man --infodir=/usr/share/info --cache-file=../config.cache --with-libdir=lib64 --with-config-file-path=/etc --with-config-file-scan-dir=/etc/php.d --disable-debug --with-pic --disable-rpath --without-pear --with-bz2 --with-exec-dir=/usr/bin --with-freetype-dir=/usr --with-png-dir=/usr --with-xpm-dir=/usr --enable-gd-native-ttf --with-t1lib=/usr --without-gdbm --with-gettext --with-iconv --with-jpeg-dir=/usr --with-openssl --with-pcre-regex=/usr --with-zlib --with-layout=GNU --enable-exif --enable-ftp --enable-magic-quotes --enable-sockets --with-kerberos --enable-ucd-snmp-hack --enable-shmop --enable-calendar --without-sqlite --with-libxml-dir=/usr --enable-xml --with-mhash --libdir=/usr/lib64/php --sysconfdir=/etc/php-fpm --enable-fpm --enable-mysqlnd --with-fpm-user=php-fpm --with-fpm-group=php-fpm --without-libedit --without-gd --without-pspell --without-sqlite3 --disable-dba --disable-dom --disable-pdo --disable-xmlreader --disable-xmlwriter --disable-phar --disable-fileinfo --disable-json --disable-wddx --disable-posix --disable-sysvmsg --disable-sysvshm --disable-sysvsem --with-mysql=mysqlnd --with-mysqli=mysqlnd --with-pdo-mysql=mysqlnd

I'm doing make && make install and whilst the install appears to be successful, PHP doesn't seem to be compiling the extensions into the extensions directly /usr/lib64/php/20100525 我正在执行make && make install ,虽然安装似乎成功,但是PHP似乎并未将扩展直接编译为扩展/usr/lib64/php/20100525

Any ideas on what I'm doing wrong? 关于我在做什么错的任何想法吗?

Instead of compiling it by hand, consider installing packages from Remi's repository . 与其手动进行编译, 不如考虑从Remi的存储库中安装软件包。 Remi is the PHP maintainer for Fedora, the distro that drives RHEL, and in turn CentOS. Remi是Fedora的PHP维护者,Fedora是驱动RHEL以及CentOS的发行版。

The "remi-test" repo currently has 5.4.9 available for CentOS 5.x and 6.x . 目前,“ remi-test”存储库可用于CentOS 5.x6.x的 5.4.9。

Do use the repo with care. 请谨慎使用回购协议。 It will also want to update MySQL, and that could have undesired side-effects. 它还将要更新MySQL,这可能会带来不希望的副作用。 The repo also requires EPEL , but you should have it available anyway. 该仓库也需要EPEL ,但是无论如何您都应该可以使用它。

Which extensions are you looking for? 您在寻找哪些扩展名? As far I as I can see you built PHP statically. 据我所知,您是静态构建PHP的。 You have to use --enabled-shared in order to get shared extensions then they will go in /usr/{PREFIX}/php/extensions/{your-build}/ ... see http://php.net/configure.about 您必须使用--enabled-shared才能获取共享扩展,然后它们将位于/usr/{PREFIX}/php/extensions/{your-build}/ 。...请参见http://php.net/configure 。关于

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM