首页 > 代码库 > phalcon安装

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

root@iZ25gdzs0p8Z:~# 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

 

 

root@iZ25gdzs0p8Z:/home# cd phalcon/
root@iZ25gdzs0p8Z:/home/phalcon#
root@iZ25gdzs0p8Z:/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.
root@iZ25gdzs0p8Z:/home/phalcon# ls
cphalcon
root@iZ25gdzs0p8Z:/home/phalcon# cd cphalcon/build
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# sudo ./install
./install: line 55: --version: command not found
php-config is not installed
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# nano install
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build#
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# ^C
root@iZ25gdzs0p8Z:/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?
root@iZ25gdzs0p8Z:/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?
root@iZ25gdzs0p8Z:/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?
root@iZ25gdzs0p8Z:/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
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# ./install
./install: line 55: --version: command not found
php-config is not installed
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# cd php7
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build/php7# ls
32bits 64bits safe
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build/php7# cd ..
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# cd ..
root@iZ25gdzs0p8Z:/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
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon# pwd
/home/phalcon/cphalcon
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon# cd ext
root@iZ25gdzs0p8Z:/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
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/ext# export CFLAGS="-O2 -finline-functions -fvisibility=hidden"
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/ext# phpize
The program ‘phpize‘ is currently not installed. You can install it by typing:
apt install php7.0-dev
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/ext# ^C
root@iZ25gdzs0p8Z:/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) ...
root@iZ25gdzs0p8Z:/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
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/ext# ./configure --with-php-config=/usr/local/php/bin/php-config --enable-phalcon
-bash: ./configure: No such file or directory
root@iZ25gdzs0p8Z:/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
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/ext# cd ..
root@iZ25gdzs0p8Z:/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
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon# cd build/
root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build# ls
gccarch.c gcccpuopt gen-build.php install php5 php7 README.md _resource
root@iZ25gdzs0p8Z:/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

root@iZ25gdzs0p8Z:/home/phalcon/cphalcon/build#

 

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

 

phalcon安装