phalcon安装

https://phalconphp.com/en/download/linux

curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bash
sudo apt-get install php7.0-phalcon

[email protected]:~# sudo apt-get install php7.0-phalcon
Reading package lists... Done
Building dependency tree
Reading state information... Done
Suggested packages:
php7.0-sqlite3 php7.0-pgsql php7.0-memcached
The following NEW packages will be installed:
php7.0-phalcon
0 upgraded, 1 newly installed, 0 to remove and 49 not upgraded.
Need to get 1,207 kB of archives.
After this operation, 5,043 kB of additional disk space will be used.
Get:1 https://packagecloud.io/phalcon/stable/ubuntu xenial/main amd64 php7.0-phalcon amd64 3.2.0-1 [1,207 kB]
Fetched 1,207 kB in 1min 58s (10.2 kB/s)
Selecting previously unselected package php7.0-phalcon.
(Reading database ... 140986 files and directories currently installed.)
Preparing to unpack .../php7.0-phalcon_3.2.0-1_amd64.deb ...
Unpacking php7.0-phalcon (3.2.0-1) ...
Setting up php7.0-phalcon (3.2.0-1) ...

Creating config file /etc/php/7.0/mods-available/phalcon.ini with new version

[email protected]:/home# cd phalcon/
[email protected]:/home/phalcon#
[email protected]:/home/phalcon# git clone --depth=1 "git://github.com/phalcon/cphalcon.git"
Cloning into ‘cphalcon‘...
remote: Counting objects: 2348, done.
remote: Compressing objects: 100% (1677/1677), done.
remote: Total 2348 (delta 921), reused 1207 (delta 534), pack-reused 0
Receiving objects: 100% (2348/2348), 3.59 MiB | 17.00 KiB/s, done.
Resolving deltas: 100% (921/921), done.
Checking connectivity... done.
[email protected]:/home/phalcon# ls
cphalcon
[email protected]:/home/phalcon# cd cphalcon/build
[email protected]:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
[email protected]:/home/phalcon/cphalcon/build# sudo ./install
./install: line 55: --version: command not found
php-config is not installed
[email protected]:/home/phalcon/cphalcon/build# nano install
[email protected]:/home/phalcon/cphalcon/build#
[email protected]:/home/phalcon/cphalcon/build# ^C
[email protected]:/home/phalcon/cphalcon/build# apt-get install php7-devel
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
[email protected]:/home/phalcon/cphalcon/build# apt-get install php7-*
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
[email protected]:/home/phalcon/cphalcon/build# apt-get install php7*
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?
[email protected]:/home/phalcon/cphalcon/build# apt-get install php*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package ‘php5‘ has no installation candidate
E: Unable to locate package php7
[email protected]:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
[email protected]:/home/phalcon/cphalcon/build# ./install
./install: line 55: --version: command not found
php-config is not installed
[email protected]:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
[email protected]:/home/phalcon/cphalcon/build# cd php7
[email protected]:/home/phalcon/cphalcon/build/php7# ls
32bits 64bits safe
[email protected]:/home/phalcon/cphalcon/build/php7# cd ..
[email protected]:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
[email protected]:/home/phalcon/cphalcon/build# cd ..
[email protected]:/home/phalcon/cphalcon# ls
appveyor.yml backers BACKERS.md build CHANGELOG.md codeception.yml composer.json config.json CONTRIBUTING.md ext LICENSE.txt optimizers phalcon phpcs.xml prototypes README.md tests unit-tests
[email protected]:/home/phalcon/cphalcon# pwd
/home/phalcon/cphalcon
[email protected]:/home/phalcon/cphalcon# cd ext
[email protected]:/home/phalcon/cphalcon/ext# ls
clean config.m4 config.w32 ext_config.h ext.h install kernel phalcon phalcon.c phalcon.h php_ext.h php_phalcon.h
[email protected]:/home/phalcon/cphalcon/ext# export CFLAGS="-O2 -finline-functions -fvisibility=hidden"
[email protected]:/home/phalcon/cphalcon/ext# phpize
The program ‘phpize‘ is currently not installed. You can install it by typing:
apt install php7.0-dev
[email protected]:/home/phalcon/cphalcon/ext# ^C
[email protected]:/home/phalcon/cphalcon/ext# apt install php7.0-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
autoconf automake dh-php libexporter-tiny-perl liblist-moreutils-perl libltdl-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libssl-dev libssl-doc libtool pkg-php-tools shtool zlib1g-dev
Suggested packages:
autoconf-archive gnu-standards autoconf-doc libtool-doc gfortran | fortran95-compiler gcj-jdk dh-make
The following NEW packages will be installed:
autoconf automake dh-php libexporter-tiny-perl liblist-moreutils-perl libltdl-dev libpcre16-3 libpcre3-dev libpcre32-3 libpcrecpp0v5 libssl-dev libssl-doc libtool php7.0-dev pkg-php-tools shtool zlib1g-dev
0 upgraded, 17 newly installed, 0 to remove and 49 not upgraded.
Need to get 5,236 kB of archives.
After this operation, 24.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://mirrors.aliyun.com/ubuntu xenial/main amd64 libpcrecpp0v5 amd64 2:8.38-3.1 [15.2 kB]
Get:2 http://mirrors.aliyun.com/ubuntu xenial/main amd64 autoconf all 2.69-9 [321 kB]
Get:3 http://mirrors.aliyun.com/ubuntu xenial/main amd64 automake all 1:1.15-4ubuntu1 [510 kB]
Get:4 http://mirrors.aliyun.com/ubuntu xenial/main amd64 libexporter-tiny-perl all 0.042-1 [28.8 kB]
Get:5 http://mirrors.aliyun.com/ubuntu xenial/main amd64 liblist-moreutils-perl amd64 0.413-1build1 [67.0 kB]
Get:6 http://mirrors.aliyun.com/ubuntu xenial/main amd64 libltdl-dev amd64 2.4.6-0.1 [162 kB]
Get:7 http://mirrors.aliyun.com/ubuntu xenial/main amd64 libpcre16-3 amd64 2:8.38-3.1 [144 kB]
Get:8 http://mirrors.aliyun.com/ubuntu xenial/main amd64 libpcre32-3 amd64 2:8.38-3.1 [136 kB]
Get:9 http://mirrors.aliyun.com/ubuntu xenial/main amd64 libpcre3-dev amd64 2:8.38-3.1 [525 kB]
Get:10 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 zlib1g-dev amd64 1:1.2.8.dfsg-2ubuntu4.1 [168 kB]
Get:11 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 libssl-dev amd64 1.0.2g-1ubuntu4.8 [1,345 kB]
Get:12 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 libssl-doc all 1.0.2g-1ubuntu4.8 [1,078 kB]
Get:13 http://mirrors.aliyun.com/ubuntu xenial/main amd64 libtool all 2.4.6-0.1 [193 kB]
Get:14 http://mirrors.aliyun.com/ubuntu xenial/main amd64 shtool all 2.0.8-8 [122 kB]
Get:15 http://mirrors.aliyun.com/ubuntu xenial-updates/main amd64 php7.0-dev amd64 7.0.18-0ubuntu0.16.04.1 [382 kB]
Get:16 http://mirrors.aliyun.com/ubuntu xenial/main amd64 dh-php all 0.10 [7,262 B]
Get:17 http://mirrors.aliyun.com/ubuntu xenial/main amd64 pkg-php-tools all 1.32ubuntu2 [33.4 kB]
Fetched 5,236 kB in 3s (1,600 kB/s)
Selecting previously unselected package libpcrecpp0v5:amd64.
(Reading database ... 140998 files and directories currently installed.)
Preparing to unpack .../libpcrecpp0v5_2%3a8.38-3.1_amd64.deb ...
Unpacking libpcrecpp0v5:amd64 (2:8.38-3.1) ...
Selecting previously unselected package autoconf.
Preparing to unpack .../autoconf_2.69-9_all.deb ...
Unpacking autoconf (2.69-9) ...
Selecting previously unselected package automake.
Preparing to unpack .../automake_1%3a1.15-4ubuntu1_all.deb ...
Unpacking automake (1:1.15-4ubuntu1) ...
Selecting previously unselected package libexporter-tiny-perl.
Preparing to unpack .../libexporter-tiny-perl_0.042-1_all.deb ...
Unpacking libexporter-tiny-perl (0.042-1) ...
Selecting previously unselected package liblist-moreutils-perl.
Preparing to unpack .../liblist-moreutils-perl_0.413-1build1_amd64.deb ...
Unpacking liblist-moreutils-perl (0.413-1build1) ...
Selecting previously unselected package libltdl-dev:amd64.
Preparing to unpack .../libltdl-dev_2.4.6-0.1_amd64.deb ...
Unpacking libltdl-dev:amd64 (2.4.6-0.1) ...
Selecting previously unselected package libpcre16-3:amd64.
Preparing to unpack .../libpcre16-3_2%3a8.38-3.1_amd64.deb ...
Unpacking libpcre16-3:amd64 (2:8.38-3.1) ...
Selecting previously unselected package libpcre32-3:amd64.
Preparing to unpack .../libpcre32-3_2%3a8.38-3.1_amd64.deb ...
Unpacking libpcre32-3:amd64 (2:8.38-3.1) ...
Selecting previously unselected package libpcre3-dev:amd64.
Preparing to unpack .../libpcre3-dev_2%3a8.38-3.1_amd64.deb ...
Unpacking libpcre3-dev:amd64 (2:8.38-3.1) ...
Selecting previously unselected package zlib1g-dev:amd64.
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-2ubuntu4.1_amd64.deb ...
Unpacking zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
Selecting previously unselected package libssl-dev:amd64.
Preparing to unpack .../libssl-dev_1.0.2g-1ubuntu4.8_amd64.deb ...
Unpacking libssl-dev:amd64 (1.0.2g-1ubuntu4.8) ...
Selecting previously unselected package libssl-doc.
Preparing to unpack .../libssl-doc_1.0.2g-1ubuntu4.8_all.deb ...
Unpacking libssl-doc (1.0.2g-1ubuntu4.8) ...
Selecting previously unselected package libtool.
Preparing to unpack .../libtool_2.4.6-0.1_all.deb ...
Unpacking libtool (2.4.6-0.1) ...
Selecting previously unselected package shtool.
Preparing to unpack .../shtool_2.0.8-8_all.deb ...
Unpacking shtool (2.0.8-8) ...
Selecting previously unselected package php7.0-dev.
Preparing to unpack .../php7.0-dev_7.0.18-0ubuntu0.16.04.1_amd64.deb ...
Unpacking php7.0-dev (7.0.18-0ubuntu0.16.04.1) ...
Selecting previously unselected package dh-php.
Preparing to unpack .../archives/dh-php_0.10_all.deb ...
Unpacking dh-php (0.10) ...
Selecting previously unselected package pkg-php-tools.
Preparing to unpack .../pkg-php-tools_1.32ubuntu2_all.deb ...
Unpacking pkg-php-tools (1.32ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up libpcrecpp0v5:amd64 (2:8.38-3.1) ...
Setting up autoconf (2.69-9) ...
Setting up automake (1:1.15-4ubuntu1) ...
update-alternatives: using /usr/bin/automake-1.15 to provide /usr/bin/automake (automake) in auto mode
Setting up libexporter-tiny-perl (0.042-1) ...
Setting up liblist-moreutils-perl (0.413-1build1) ...
Setting up libltdl-dev:amd64 (2.4.6-0.1) ...
Setting up libpcre16-3:amd64 (2:8.38-3.1) ...
Setting up libpcre32-3:amd64 (2:8.38-3.1) ...
Setting up libpcre3-dev:amd64 (2:8.38-3.1) ...
Setting up zlib1g-dev:amd64 (1:1.2.8.dfsg-2ubuntu4.1) ...
Setting up libssl-dev:amd64 (1.0.2g-1ubuntu4.8) ...
Setting up libssl-doc (1.0.2g-1ubuntu4.8) ...
Setting up libtool (2.4.6-0.1) ...
Setting up shtool (2.0.8-8) ...
Setting up php7.0-dev (7.0.18-0ubuntu0.16.04.1) ...
update-alternatives: using /usr/bin/php-config7.0 to provide /usr/bin/php-config (php-config) in auto mode
update-alternatives: using /usr/bin/phpize7.0 to provide /usr/bin/phpize (phpize) in auto mode
Setting up dh-php (0.10) ...
Setting up pkg-php-tools (1.32ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu7) ...
[email protected]:/home/phalcon/cphalcon/ext# ls
clean config.m4 config.w32 ext_config.h ext.h install kernel phalcon phalcon.c phalcon.h php_ext.h php_phalcon.h
[email protected]:/home/phalcon/cphalcon/ext# ./configure --with-php-config=/usr/local/php/bin/php-config --enable-phalcon
-bash: ./configure: No such file or directory
[email protected]:/home/phalcon/cphalcon/ext# ls
clean config.m4 config.w32 ext_config.h ext.h install kernel phalcon phalcon.c phalcon.h php_ext.h php_phalcon.h
[email protected]:/home/phalcon/cphalcon/ext# cd ..
[email protected]:/home/phalcon/cphalcon# ls
appveyor.yml backers BACKERS.md build CHANGELOG.md codeception.yml composer.json config.json CONTRIBUTING.md ext LICENSE.txt optimizers phalcon phpcs.xml prototypes README.md tests unit-tests
[email protected]:/home/phalcon/cphalcon# cd build/
[email protected]:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
[email protected]:/home/phalcon/cphalcon/build# ./install
Configuring for:
PHP Api Version: 20151012
Zend Module Api No: 20151012
Zend Extension Api No: 320151012
configure: WARNING: You will need re2c 0.13.4 or later if you want to regenerate PHP parsers.
libtool: compile: gcc -I. -I/home/phalcon/cphalcon/build/php7/64bits -DPHP_ATOM_INC -I/home/phalcon/cphalcon/build/php7/64bits/include -I/home/phalcon/cphalcon/build/php7/64bits/main -I/home/phalcon/cphalcon/build/php7/64bits -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -fomit-frame-pointer -c /home/phalcon/cphalcon/build/php7/64bits/phalcon.zep.c -fPIC -DPIC -o .libs/phalcon.o
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Makefile:194: recipe for target ‘phalcon.lo‘ failed
make: *** [phalcon.lo] Error 1
libtool: compile: gcc -I. -I/home/phalcon/cphalcon/build/php7/64bits -DPHP_ATOM_INC -I/home/phalcon/cphalcon/build/php7/64bits/include -I/home/phalcon/cphalcon/build/php7/64bits/main -I/home/phalcon/cphalcon/build/php7/64bits -I/usr/include/php/20151012 -I/usr/include/php/20151012/main -I/usr/include/php/20151012/TSRM -I/usr/include/php/20151012/Zend -I/usr/include/php/20151012/ext -I/usr/include/php/20151012/ext/date/lib -DPHALCON_RELEASE -DHAVE_CONFIG_H -march=native -mtune=native -O2 -fomit-frame-pointer -c /home/phalcon/cphalcon/build/php7/64bits/phalcon.zep.c -fPIC -DPIC -o .libs/phalcon.o
gcc: internal compiler error: Killed (program cc1)
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-5/README.Bugs> for instructions.
Makefile:194: recipe for target ‘phalcon.lo‘ failed
make: *** [phalcon.lo] Error 1

Thanks for compiling Phalcon!
Build succeed: Please restart your web server to complete the installation

[email protected]:/home/phalcon/cphalcon/build#

参考:http://blog.csdn.net/zimuxin/article/details/52450510

时间: 2025-01-06 08:04:04

phalcon安装的相关文章

phalcon安装笔记

参考官网 git clone --depth=1 git://github.com/phalcon/cphalcon.git cd cphalcon/build sudo ./install 添加配置文件 cd /etc/php5/mods-available/ sudo gvim ./phalcon.ini extension=phalcon.so 重启服务器 sudo service php5-fpm restart 安装开发者工具,用来创建工程等等 git clone https://gi

phalcon安装-遇坑php-config is not installed 解决方法

通过源码编译安装php环境,按照phalcon官方文档安装扩展,会遇到php-config is not installed的坑. 尝试通过下列命令可以解决: 1 cd /opt/cphalcon-3.2.1/build/php7/64bits 2 && phpize --enable-phalcon 3 --with-phpconfig=/usr/local/src/php7/bin/php-config 4 && ./configure --with-php-confi

Phalcon安装注意事项

# RHEL sudo yum install php-devel php-mysql gcc libtool pcre-devel 第二步 git clone --depth=1 "git://github.com/phalcon/cphalcon.git" cd cphalcon/build sudo ./install 注意:这是centos的安装,php版本是5.6,通过yum安装的版本, 第三步,把extension=phalcon.so 加入php.ini文件这个是官网的说

php安装phalcon扩展

一.关于phalcon: 简介: Phalcon 是开源.全功能栈.使用 C /zephir 编写.针对高性能优化的 PHP 5 框架. 开发者不需要学习和使用 C 语言的功能, 因为所有的功能都以 PHP 类的方式暴露出来,可以直接使用. Phalcon 也是松耦合的,可以根据项目的需要任意使用其他对象. github: https://github.com/phalcon/cphalcon phalcon2.0以前用C开发,Phalcon2.0 已经改用 Zephir 重写(Zephir 是

PHP三大框架对比

写PHP程序一年有余期间使用了CI, ThinkPHP, Phalcon等框架说一下我的感受 CI 优点: 这个框架的入门槛很底 极易学 极易用 框架很小 静态化非常容易 框架易扩展 文档比较详尽 缺点: 在极易用的极小下隐藏的缺点即是不安全 功能不是太全 缺少非常多的东西 比如你想使用mongoDB你就得自己实现接口... 对数据的操作亦不是太安全 比如对update和delete操作等不够安全 暂不支持sae bae等(毕竟是欧洲)对大型项目的支持不行 小型项目会非常好 ThinkPHP 优

一个神奇的PHP框架:Phalcon 之编译安装

前言 CentOS7下升级PHP到最新版本以及编译安装phalcon框架,看相关文档无数遍,自己尝试编译安装之后才理解的更深,编译步骤以及碰到的问题做个简单的记录 php-7.0.11编译安装 1.下载php-7.0.11源码 http://php.net/downloads.php#v7.0.11 2.依赖开发包 yum install gcc gcc-c++ libjpeg libjpeg-devel libpng libpng-devel freetype freetype-devel l

linux下安装msgpack,yar,phalcon

安装msgpack扩展 下载:http://pecl.php.net/package/msgpack cd /usr/local tar zxvf msgpack-0.5.5.tgz cd msgpack-0.5.5 phpize ./configure --with-php-config=/usr/local/php5/bin/php-config make && make install 会在no-debug-non-zts-20090626中生成msgpack.so 在php.ini

ubuntu linux 下 Phalcon 开发工具安装

1. 装好phalcon php扩展 2. 下载phalcon-devtools:https://github.com/phalcon/phalcon-devtools 或者git克隆: git clone git://github.com/phalcon-devtools.git 3.安装: cd phalcon-devtools ./phalcon.sh 4. 建立快捷方式 ln -s ~/phalcon-devtools/phalcon.php /usr/bin/phalcon chmod

安装php phalcon扩展

一.安装需要的工具包,如果有了就不要安装了 #Ubuntu sudo apt-get install php5-dev php5-mysql gcc libpcre3-dev #Fedora sudo yum install php-devel php-mysqlnd gcc libtool #RHEL sudo yum install php-devel php-mysql gcc libtool #Suse yast2 -i php5-pear php5-devel php5-mysql g