Ubuntu上安装yaf扩展的方法
author:一佰互联 2019-04-25   click:163

一、下载

yaf扩展下载地址

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

选择你想要下载的包

wget http://pecl.PHP.net/get/yaf-2.3.5.tgztar zxvf yaf-2.3.5.tgzcd yaf-2.3.5

二、安装

#whereis phpize/data/yaf-2.3.5# /usr/bin/phpize#whereis php-configphp-config: /usr/bin/php-config /usr/share/man/man1/php-config.1.gz/data/yaf-2.3.5# ./configure --with-php-config=/usr/bin/php-config/data/yaf-2.3.5# make && make install

解决方法:

最后一条命令时可能出现错误:compilation terminated. make: * [yaf_router.lo] Error 1

sudo apt-get install libpcre3 libpcre3-dev openssl libssl-dev

再执行最后一条命令。

一切顺利的话,应该是这样的:

也可以执行以下make test 

还有可能出现这样的错误:cp:cannot create regular file ‘/usr/lib/php5/20121212/#INST@13121#":Permission denied

这是权限不够,当前用户不是root,可以通过su切换到root,输入root密码即可,忘记密码可以重设:sudo passwd root

在php.ini中添加:

extension=yaf.so

如果不知道php.ini在哪儿,可以看phpinfo

最后,重启服务器

以上这篇Ubuntu上安装yaf扩展的方法就是小编分享给大家的全部内容了,希望能给大家一个参考,也希望大家多多支持网页设计。