linux环境下安装yaf

1、ubuntu环境php

一、首先到http://pecl.php.net/get/yaf下载最新版本的yaf,个人是yaf-2.2.9.tgz。linux

二、解压 tar  -zxvf yaf-2.2.9.tgz,  进入到解压后的文件夹cd yaf-2.2.9.tgz
三、执行/usr/bin/phpize (phpize的目录可能不一样哦)  ,而后执行./configure --with-php-config=/usr/bin/php-config  (注意等号两边不能有空格)
四、执行make ,此时有可能出现make: *** [yaf_router.lo] 错误 1的错误提示,解决方法为  sudo apt-get install libpcre3 libpcre3-dev openssl libssl-dev
五、最后执行 sudo make install  (要用管理员的权限)
六、最后会提示你yaf.so扩展模块在哪,说明安装成功了!

 

2、linux环境nginx

php5.5ubuntu

nginx1.4.6es5

下面开始安装spa

下载最新的yaf包.net

http://pecl.php.net/package/yaf code

我下载的最新版本为2.3.3router

解压 blog

   $PHP_BIN/phpize
      ./configure --with-php-config=$PHP_BIN/php-config make make install

 

我执行时报错误。

用whereis phpize 查看查看phpize,发现phpize为空,说明没有安装

执行这个命令

sudo apt-get install php-dev

执行完后,用whereis phpize

komiles@Aspire-v5 ~ $ whereis phpize
phpize: /usr/bin/phpize /usr/bin/X11/phpize /usr/share/man/man1/phpize.1.gz

看到这个说明你已经安装了phpize

而后执行这个(必须用root用户执行,不然会报错误)

 /usr/bin/phpize ./configure --with-php-config=/usr/bin/php-config

下面这个错误

Cannot find config.m4. 
Make sure that you run '/usr/bin/phpize' in the top level source directory of the module

 

执行make命令时报这个错误

make: *** No targets specified and no makefile found.  Stop.

须要安装

 
 
sudo apt- get install libncurses5-dev
 

这样执行

./configure make
相关文章
相关标签/搜索