阿里云linux服务器安装Phalcon-----"phalcon Volt directory can't be written" "gcc: internal compiler error: Killed (program cc1)"

这里特别蛋疼的一件事是官方英文文档中文文档命令参数略有不同

中文文档:

 1 //通用平台下安装指定的软件包:

 2 sudo yum install git gcc make pcre-devel php-devel

 3 

 4 //编译

 5 git clone git://github.com/phalcon/cphalcon.git

 6 cd cphalcon/build

 7 sudo ./install

 8 

 9 //添加扩展到你的php配置文件

10 #Centos/RedHat: Add a file called phalcon.ini in /etc/php.d/ with this content:

11 extension=phalcon.so

 

英文文档:

//We need some packages previously installed:

sudo yum install php-devel php-mysqlnd gcc libtool



//To create the extension from C source follow these steps:

git clone --depth=1 git://github.com/phalcon/cphalcon.git

cd cphalcon/build

sudo ./install



//Add the extension to your php.ini:

extension=phalcon.so

 

我安装的时候是综合这2个文档来,因为半天没弄出来病急乱投胎....

编译的过程中报错:

gcc: internal compiler error: Killed (program cc1)

主要问题是因为内存不足导致的,为解决该问题通过增加swap分区来解决,具体方法如下:

sudo mkdir -p /var/cache/swap/

sudo dd if=/dev/zero of=/var/cache/swap/swap0 bs=1M count=512

sudo chmod 0600 /var/cache/swap/swap0

sudo mkswap /var/cache/swap/swap0 

sudo swapon /var/cache/swap/swap0

参考:http://www.cnblogs.com/Jerryshome/p/4217854.html

 

Phalcon安装完后,访问用Phalcon开发工具自动生成的项目,网页报错:

“phalcon Volt directory can't be written”

解决方法,给app/cache文件夹添加写权限

//我这里直接添加所有访问权限了->->

chmod 777 cache

 

你可能感兴趣的:(Directory)