Phalcon Install (PPA) does not work on Ubuntu 16.04 Xenail

I try to install Phalcon PHP on a new Ubuntu 16.04 Xenial Server with 1 Gb of RAM, the compitaion procedure fail dued to insificiente memory.

I try to install by PPA on this server and ther is not a File for Xenial:

# sudo apt-add-repository -y ppa:phalcon/stable
gpg: keyring `/tmp/tmp14fuxlit/secring.gpg' created
gpg: keyring `/tmp/tmp14fuxlit/pubring.gpg' created
gpg: requesting key 1E569794 from hkp server keyserver.ubuntu.com
gpg: /tmp/tmp14fuxlit/trustdb.gpg: trustdb created
gpg: key 1E569794: public key "Launchpad PPA for Phalcon PHP Framework" imported
gpg: Total number processed: 1
gpg:               imported: 1  (RSA: 1)
OK
# sudo apt update -q
...
Err:4 http://ppa.launchpad.net/phalcon/stable/ubuntu xenial Release
  404  Not Found
...
Reading package lists...
E: The repository 'http://ppa.launchpad.net/phalcon/stable/ubuntu xenial Release' does not have a Release file.

I can't install phalcon php on this server, the install command says:

sudo apt install php5-phalcon
Reading package lists... Done
Building dependency tree       
Reading state information... Done
E: Unable to locate package php5-phalcon

Then add swap file and compile it again.

edited Jul '16

Adding swap is definitely NOT a solution.

There's no binary package for Xenial yet, that's why you can't use PPA.

For compiling, do it from CLI (i.e. turn off Unity and all memory consuming apps), see if that helps.

On the other hand, working with 1 GB on a Linux GUI mode is under any reasonable limit. Xenial needs 2 GB minimum. Perhaps you should run XFCE desktop distro instead of Unity/latest Ubuntu if you really can't add more RAM.

I try to install Phalcon PHP on a new Ubuntu 16.04 Xenial Server with 1 Gb of RAM, the compitaion procedure fail dued to insificiente memory.

Adding swap will make it possible to compile - so IT IS solution.

edited Jul '16

If someone wants to bring machine to it's knees, sure, adding more swap might look promising.

By default, installation of GNU/Linux will create swap partition of the same size as machine's PHY RAM. So in case of @larmedina75, it has at least 1 GB of swap already (unless he partitioned FS manually w/o any swap).

Now we want to conclude that 2 GB of total system memory is not enough for a C codebase (Phalcon) to compile? It looks to me that many apps are eating that RAM already, not the Phalcon/Zephir compilation process.

Adding more swap might be a solution to overcome compilation process, but it's just a definite sign that it needs more RAM, especially for production, simple as that.

Oh okay, then you are right if you are saying what you are saying. Just didn't know about it that by default linux create swap partition. On digitalocean i needed to do it myself ro example.

I mean on compile it's always take a much of ram, but after that he should of course remove it or went back to previous value.

In the moment I can't increase RAM, i just have 1 Gb of RAM and i can't add a swap partition. In this condition compilation of phalcon fail following procedure documeted here:

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

The server has no installed GUI nor other software, just a ubuntu server instance on digitalocean.com. System has 127Mb of used memory and the standar procedure does not work on Ubuntu Server 16.04

A workaround to make Phalcon PHP works on Ubuntu 16.04 it's documented here: https://gist.github.com/Tosyn/fef6437dd3906ff200e471e478eaae95

Uses PHP 7 and Phalcon php, but the compilation of phalcon uses zephir binary to create the php extension of phalcon.

This works for me without create a swap file nor increase memory, but I will try this methods to learn how to do it.

I will share my results later.

Thanks by share your comments.

edited Jul '16

I just compiled Phalcon on RPi 2 (BCM2709 SoC), ARM 32 bit with 1 GB of RAM. Default Raspbian install created swap partition with only 100 MB in total size. Phalcon compiled in ~12 minutes w/o any issues, and swap wasn't even touched.

@jurigag: conclusion is that 1 GB of RAM is not an limitation, unless other apps are eating too much, which can happen on 16 GB RAM machine as well. Basic Linux setup with 1 GB of RAM compiles Phalcon w/o any issues.

@larmedina75: you should really check your other apps on the server, Phalcon v2.0.13 compiled w/o issues on my little RPi 2 computer.

Yea i know. But on 512 MB ram vps i had a problem and needed to add swap file. I think it is beacause compile script in phalcon by default is using 2 compiler processes and they were eating too much ram. For usre 1gb of ram should be enough for compile. Disable mysql and other related stuff which are not needed for compile process.