Home  >  Article  >  Backend Development  >  How to install yaf extension on Ubuntu

How to install yaf extension on Ubuntu

小云云
小云云Original
2018-01-31 09:12:421335browse

This article mainly shares with you how to install the yaf extension on Ubuntu. It has a good reference value and I hope it will be helpful to everyone. Let’s follow the editor to take a look, I hope it can help everyone.

1. Download

yaf extension download address

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

Choose what you want Package to be downloaded

wget http://pecl.PHP.net/get/yaf-2.3.5.tgz
tar zxvf yaf-2.3.5.tgz
cd yaf-2.3.5

2. Installation

#whereis phpize
/data/yaf-2.3.5# /usr/bin/phpize
#whereis php-config
php-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

Solution:

An error may occur during the last command: compilation terminated. make: * [yaf_router.lo] Error 1

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

Execute the last command again.

If everything goes well, it should look like this:

也可以执行以下make test

There may also be errors like this: cp:cannot create regular file '/usr/lib /php5/20121212/#INST@13121#':Permission denied

This is insufficient permission. The current user is not root. You can switch to root through su and enter the root password. If you forget the password, you can reset it: sudo passwd root

Add in php.ini:

extension=yaf.so

If you don’t know where php.ini is, you can look at phpinfo

Finally , restart the server

Related recommendations:

Detailed example of Yaf framework PHPUnit integration test method

Share the tutorial on how to install Swoole, Yar, and Yaf under PHP 7

Installation of LAMP environment and yaf extension under Ubuntu14

The above is the detailed content of How to install yaf extension on Ubuntu. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn