php 编译安装phalcon组件遇到的坑

我用的服务器是ubuntu server 14.04 LTS

按照官网说:


编译

1. 从C源代码创建扩展请按照下面的步骤:

git clone --depth=1 git://github.com/phalcon/cphalcon.git
cd cphalcon/build
sudo ./install

2. 添加扩展到php.ini文件:

extension=phalcon.so

3. 最后,重启web服务器



我的安装一直卡在

config.status: executing libtool commands
/bin/bash /root/cphalcon/build/64bits/libtool --mode=compile gcc  -I. -I/root/cphalcon/build/64bits -DPHP_ATOM_INC -I/root/cphalcon/build/64bits/include -I/root/cphalcon/build/64bits/main -I/root/cphalcon/build/64bits -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib  -DPHALCON_RELEASE -DHAVE_CONFIG_H  -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden   -c /root/cphalcon/build/64bits/phalcon.c -o phalcon.lo 
libtool: compile:  gcc -I. -I/root/cphalcon/build/64bits -DPHP_ATOM_INC -I/root/cphalcon/build/64bits/include -I/root/cphalcon/build/64bits/main -I/root/cphalcon/build/64bits -I/usr/include/php5 -I/usr/include/php5/main -I/usr/include/php5/TSRM -I/usr/include/php5/Zend -I/usr/include/php5/ext -I/usr/include/php5/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -finline-functions -fomit-frame-pointer -fvisibility=hidden -c /root/cphalcon/build/64bits/phalcon.c  -fPIC -DPIC -o .libs/phalcon.o
这个地方,两个小时不动弹


后来去他们的论坛找到了一个解决方案:

大家不妨试试:

cd cphalcon/ext
export CFLAGS="-O2 -finline-functions -fvisibility=hidden"
phpize 
./configure --enable-phalcon
make
sudo make install

地址:https://forum.phalconphp.com/discussion/2797/install-halts-on-ubuntu-14-04

你可能感兴趣的:(PHP,ubuntu,web服务器)