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
相關文章
相關標籤/搜索