phpÔ´´úÂë°²×°³£¼û´íÎóÓë½â¾ö°ì·¨·ÖÏí

5年以前  |  阅读数:891 次  |  编程语言:PHP 

´iÎo£ºconfigure: error: libevent >= 1.4.11 could not be found

½a¾o£ºyum -y install libevent libevent-devel

´iÎo£ºconfigure: error: Please reinstall the mysql distributio

½a¾o£ºyum -y install mysql-devel

´iÎo£ºmake: *** [sapi/fpm/php-fpm] error 1

½a¾o£ºÓÃmake ZEND_EXTRA_LIBS='-liconv'±aÒe

´iÎo£ºconfigure: error: XML configuration could not be found

½a¾o£ºyum -y install libxml2 libxml2-devel

´iÎo£ºconfigure: error: No curses/termcap library found

½a¾o£ºyum -y install ncurses ncurses-devel

´iÎo£ºconfigure: error: xml2-config not found

½a¾o£ºyum -y install libxml2 libxml2-devel

´iÎo£ºconfigure: error: Cannot find OpenSSL's <evp.h>

½a¾o£ºyum install openssl openssl-devel

´iÎo£ºconfigure: error: Please reinstall the libcurl distribution -easy.h should be in /include/curl/

½a¾o£ºyum install curl curl-devel

´iÎo£ºconfigure: error: Cannot find ldap.h

½a¾o£ºyum install openldap openldap-devel

´iÎo£ºconfigure: error: libjpeg.(a|so) not found

½a¾o£ºyum install libjpeglibjpeg -devel

´iÎo£ºconfigure: error: libpng.(a|so) not found.

½a¾o£ºyum install libpnglibpng ¨Cdevel

´iÎo£ºonfigure: error: freetype.h not found.

½a¾o£ºyum install freetype-devel

´iÎo£ºconfigure: error: cannot find output from lex; giving up

½a¾o£ºyum -y install flex

´iÎo£ºconfigure: error: mod_deflate has been requested but can not be built due to prerequisite failures

½a¾o£ºyum -y install zlib-devel openssl-devel

´iÎo£ºConfigure: error: Unable to locate gmp.h

½a¾o£ºyum install gmp-devel

´iÎo£ºConfigure: error: Cannot find MySQL header files under /usr.

Note that the MySQL client library is not bundled anymore!

½a¾o£ºyum install mysql-devel

**¸u¶aµÄ²¹³aÄÚÈÝ£º

**°²×°php: ./configure
configure: error: XML configuration could not be found

yum -y install libxml2 libxml2-devel

Cannot find OpenSSL's <evp.h>
yum install openssl openssl-devel

  1. Configure: error: xml2-config not found. Please check your libxml2 installation.

    yum install libxml2 libxml2-devel (For RedHat & Fedora)

    aptitude install libxml2-dev (For Ubuntu)

  2. Checking for pkg-config¡­ /usr/bin/pkg-config
    configure: error: Cannot find OpenSSL's <evp.h>

    yum install openssl openssl-devel

  3. Configure: error: Please reinstall the BZip2 distribution

    yum install bzip2 bzip2-devel

  4. Configure: error: Please reinstall the libcurl distribution -
    easy.h should be in /include/curl/

    yum install curl curl-devel (For RedHat & Fedora)

    install libcurl4-gnutls-dev (For Ubuntu)

  5. Configure: error: libjpeg.(also) not found.

    yum install libjpeg libjpeg-devel

  6. Configure: error: libpng.(also) not found.

    yum install libpng libpng-devel

  7. Configure: error: freetype.h not found.

    yum install freetype-devel

  8. Configure: error: Unable to locate gmp.h

    yum install gmp-devel

  9. Configure: error: Cannot find MySQL header files under /usr.
    Note that the MySQL client library is not bundled anymore!

    yum install mysql-devel (For RedHat & Fedora)

    apt-get install libmysql++-dev (For Ubuntu)

  10. Configure: error: Please reinstall the ncurses distribution

    yum install ncurses ncurses-devel

  11. Checking for unixODBC support¡­ configure: error: ODBC header file ¡®/usr/include/sqlext.h' not found!

    yum install unixODBC-devel

  12. Configure: error: Cannot find pspell

    yum install pspell-devel

  13. configure: error: mcrypt.h not found. Please reinstall libmcrypt.

    yum install libmcrypt libmcrypt-devel (For RedHat & Fedora)

    apt-get install libmcrypt-dev

  14. Configure: error: snmp.h not found. Check your SNMP installation.

    yum install net-snmp net-snmp-devel

  15. /usr/bin/ld: cannot find -lltdl
    collect2: ld returned 1 exit status
    make: *** [sapi/cgi/php-cgi] Error 1

    yum install libtool-ltdl.x86_64 libtool-ltdl-devel.x86_64

16£(C)
Ϊphp±aÒexcacheÄ£¿eµÄʱºo£¬ÐeÒªÔËÐÐphpize
µÃµ½ÁËÒ»¸o´iÎo

/usr/local/php/bin/phpize

Configuring for:
PHP Api Version: 20041225
Zend Module Api No: 20060613
Zend Extension Api No: 220060519
Cannot find autoconf. Please check your autoconf installation and the $PHP_AUTOCONF
environment variable is set correctly and then rerun this script.
ͨ¹ý°²×° autoconf ¿ÉÒÔ½a¾o
centosÏÂÖ´ÐÐ yum install autoconf ¼´¿É
UbuntuÏÂÖ´ÐÐ apt-get install autoconf ¼´¿É
17£(C)

/usr/local/php/bin/phpize

Cannot find config.m4.
Make sure that you run '/usr/local/php/bin/phpize' in the top level source directory of the module
Ð޸Ľ¨£º
[root@centos lnmp]# cd php-5.2.14ext/
[root@centos ext]# ./ext_skel --extname=my_module
Creating directory my_module
Creating basic files: config.m4 config.w32 .cvsignore my_module.c php_my_module.h CREDITS EXPERIMENTAL tests/001.phpt my_module.php [done].
To use your new extension, you will have to execute the following steps:
1. $ cd ..
2. $ vi ext/my_module/config.m4
3. $ ./buildconf
4. $ ./configure --[with|enable]-my_module
5. $ make
6. $ ./php -f ext/my_module/my_module.php
7. $ vi ext/my_module/my_module.c
8. $ make
Repeat steps 3-6 until you are satisfied with ext/my_module/config.m4 and
step 6 confirms that your module is compiled into PHP. Then, start writing
code and repeat the last two steps as often as necessary.
[root@centos ext]# cd my_module/
[root@centos my_module]# vim config.m4
¸u¾ÝÄa×Ô¼ºµÄÑ¡Ôñ½«
dnl PHP_ARG_WITH(my_module, for my_module support,
dnl Make sure that the comment is aligned:
dnl [ --with-my_module Include my_module support])
Ð޸ijÉ
PHP_ARG_WITH(my_module, for my_module support,
Make sure that the comment is aligned:
[ --with-my_module Include my_module support])
»oÕß½«
dnl PHP_ARG_ENABLE(my_module, whether to enable my_module support,
dnl Make sure that the comment is aligned:
dnl [ --enable-my_module Enable my_module support])
Ð޸ijÉ
PHP_ARG_ENABLE(my_module, whether to enable my_module support,
Make sure that the comment is aligned:
[ --enable-my_module Enable my_module support])
[root@centos my_module]# vim my_module.c
¡¡¡¡½«ÎļþÆaÖеÄÏÂÁдuÂe½øÐÐÐÞ¸Ä
/ Every user visible function must have an entry in my_module_functions[].
/
function_entry my_module_functions[] = {
¡¡¡¡¡¡¡¡PHP_FE(say_hello,¡¡¡¡¡¡ NULL)¡¡/ ?Ìi¼Ó×ÅÒ»ÐдuÂe /
¡¡¡¡¡¡¡¡PHP_FE(confirm_my_module_compiled,¡¡¡¡¡¡NULL) / For testing, remove later. /
¡¡¡¡¡¡¡¡{NULL, NULL, NULL}¡¡¡¡¡¡/ Must be the last line in my_module_functions[] /
};
¡¡¡¡ÔÚÎļþµÄ×iºoÌi¼ÓÏÂÁдuÂe
PHP_FUNCTION(say_hello)
{
¡¡¡¡¡¡¡¡zend_printf("hello sdomain!");
}
ÔÙÐ޸ģºphp_sdomain.h
vi php_sdomain.h
ÔÚPHP_FUNCTION(confirm_my_module_compiled ); / For testing, remove later. / ÕaÐеÄÏÂÃaeÌi¼ÓÒ»ÐУº
PHP_FUNCTION(say_hello); / For testing, remove later. /
¡¡¡¡±£´aeÎļþÍ˳o
¡¡¡¡È»ºoÎÒÃǾͿÉÒÔÔÚÕa¸oĿ¼ÏÂʹÓÃÉÏÃaeµÄÃuÁiÁË
¡¡¡¡/usr/local/php/bin/phpize
¡¡¡¡Ö´ÐÐÒÔºo»a¿´µ½ÏÂÃaeµÄ
¡¡¡¡[root@ns sdomain]# /usr/local/php/bin/phpize
¡¡¡¡Configuring for:
¡¡¡¡PHP Api Version:¡¡¡¡¡¡¡¡ 20020918
¡¡¡¡Zend Module Api No:¡¡¡¡¡¡20020429
¡¡¡¡Zend Extension Api No:¡¡ 20050606
¡¡¡¡[root@ns sdomain]#
¡¡¡¡È»ºoÖ´ÐÐ./configure --with-php-config=/usr/local/php/bin/php-config
¡¡¡¡È»ºoÖ´ÐÐmake
¡¡ make install
È»ºoËu»a°Ñ¶ÔÓ¦µÄsoÎļþÉu³Éŵ½PHP°²×°Ä¿Â¼ÏÂÃaeµÄÒ»¸oÎļþ¼Ð£¬²¢ÌaʾÔÚÔÚʲôµØ½£¬È»ºoÔÙ°ÑÀiÃaeµÄSOÎļþ¿½µ½Äa´aeÅSOÎļþµÄµØ½
¡¡¡¡¼´ÄaÔÚphp.iniÀiÃaeµÄextension_dirËuÖ¸¶¨µÄλÖÃ
¡¡¡¡×iºoÒ»²½ÊÇÄaÔÚphp.iniÎļþÖдo¿ªÕa¸oÀ(C)Õ¹
¡¡¡¡extension=sdomain.so
¡¡¡¡È»ºo
¡¡¡¡ÖØÐÂÆð¶¯apache

ÒÔÉÏ´iÎo¶¼ÊÇÔÚÕu¸o±aÒe°²×°Óoµ½µÄÎÊÌa£¬È»ºo½aºÏÍøÉϵÄ×ÊÁÏ£¬ÕÒµ½µÄ½a¾o½¨£¬×ܽaµ½Õa¸oµØ*½£¬Ï£ÍuÄÜ°iµ½´o¼Ò£¡

 相关文章:
PHP分页显示制作详细讲解
SSH 登录失败:Host key verification failed
获取IMSI
将二进制数据转为16进制以便显示
获取IMEI
文件下载
贪吃蛇
双位运算符
PHP自定义函数获取搜索引擎来源关键字的方法
Java生成UUID
发送邮件
年的日历图
提取后缀名
在Zeus Web Server中安装PHP语言支持
让你成为最历害的git提交人
Yii2汉字转拼音类的实例代码
再谈PHP中单双引号的区别详解
指定应用ID以获取对应的应用名称
Python 2与Python 3版本和编码的对比
php封装的page分页类完整实例