We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

phalcon executable issue on vagrant box

Hi, phalconers! I got an issue with the vagrant box from phalcon/vagrant.

Essentially, if I try to start phalcon this happens:

$ phalcon
ERROR: Phalcon extension isn't installed, follow these instructions to install it: https://docs.phalcon.io/en/latest/reference/install.html

I tried to trace the phalcon executable, and it was defaulting to php7. After update-alternatives --set php /usr/bin/php5.6 these errors appeared as well:

$ phalcon
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/libsodium.so' - /usr/lib/php/20131226/libsodium.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/phalcon.so' - /usr/lib/php/20131226/phalcon.so: cannot open shared object file: No such file or directory in Unknown on line 0
PHP Warning:  PHP Startup: Unable to load dynamic library '/usr/lib/php/20131226/yaml.so' - /usr/lib/php/20131226/yaml.so: cannot open shared object file: No such file or directory in Unknown on line 0
ERROR: Phalcon extension isn't installed, follow these instructions to install it: https://docs.phalcon.io/en/latest/reference/install.html

what am I doing wrong? And why shouldn't it work OOB on the vagrant virtual machine?... Thank you anticipately for the response.

I'm not Vagrant fan, but if you have a mix of both PHP 7 and PHP 5.6? Well, that will cause you many troubles if you're not familiar how to tie them to work together. Is that Ubuntu 16.04 as your base?



1.1k

Oh well, the point is that they should not be tied together. According to what the list of included packages says on the page I linked in the OP PHP7 should not even be there.

I'm not Vagrant fan, but if you have a mix of both PHP 7 and PHP 5.6? Well, that will cause you many troubles if you're not familiar how to tie them to work together. Is that Ubuntu 16.04 as your base?

edited Jun '16

Seems to be overlapping with my problem: https://forum.phalcon.io/discussion/11811/vagrant-machine

could you check if you get the same errors during running vagrant up, please?

https://pastebin.com/Gn64FNBf



1.1k

Well, not quite. This is what bash says after vagrant up. Phalcon not working is what we got in common, though.

Seems to be overlapping with my problem: https://forum.phalcon.io/discussion/11811/vagrant-machine

could you check if you get the same errors during running vagrant up, please?

https://pastebin.com/Gn64FNBf

The error shown in the pastebin happens during the initial installation of the box. So I didnt made that clear, I meant the first vagrant up, which sets up your virtual machine and installs all the required packages.



1.1k

This is what happens after vagrant destroy && vagrant up. Appearently the issue is caused by trying to install something with PEAR with PHP7. At least that's what google says. Would it be possible to ask the maintainer remove the PHP7 installation from the vagrant box eventually?

The error shown in the pastebin happens during the initial installation of the box. So I didnt made that clear, I meant the first vagrant up, which sets up your virtual machine and installs all the required packages.