2017/07/30

How to compile PHP extension on Ubuntu 14.04

Install PHP 5.6
sudo su
apt-get install python-software-properties
add-apt-repository ppa:ondrej/php
apt-get update
apt-get install php5.6 -y
php -v

Download package and compile it
wget  http://pecl.php.net/get/xdebug-2.5.5.tgz
tar -zxf xdebug-2.5.5.tgz
cd xdebug-2.5.5
phpize
./configure -with-php-config=/usr/bin/php-config5.6
make && make install

It will show the info as below
Installing shared extensions:     /usr/lib/php/20131226/
cd /usr/lib/php/20131226/
ls -l
You can find your xdebug.so for php extension

沒有留言:

張貼留言