Unable to install php-5 phalcon for ubuntu 16.04 - php

My machine is running on ubuntu 16.04 and I have installed php 5.6, but when I am trying to run to install php5-phalcon, it returns error that package not found.
Following is command that I ran
sudo apt-get install php5-phalcon
It returns following output
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php5-phalcon

You need to add the correct repository in first...
curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bash
sudo apt-get install php5-phalcon
# Ubuntu 16.04+, Debian 9+
sudo apt-get install php7.0-phalcon
(From https://phalconphp.com/en/download/linux)

After trying few methods, found that php5.6-phalcon is not available for ubuntu 16.04, following are steps to install php7.0-phalcon :
curl -s "https://packagecloud.io/install/repositories/phalcon/stable/script.deb.sh" | sudo bash
# Ubuntu 16.04+, Debian 9+
sudo apt-get install php7.0-phalcon

Related

While installing php7.3 it shows "Unable to locate package php7.3-fpm"

While installing php-fpm it shows an error:
E: Unable to locate package php7.3
E: Unable to locate package php7.3-fpm
Please tell me, how to solve this issue.
I am using Ubuntu 16.04 LTS server.
PHP 7.3 may not be available in Ubuntu 16.04 default repo, you need to add third party repo. I have used ondrej repo quiet often and it works great.
Run the below commands:
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.3
You will need sudo permission to run the above commands.

Unable to install php 5.6 in ubuntu 14.04

I am trying to install php5.6 into my ubuntu 14.04 server.
Using following link
https://tecadmin.net/install-php5-on-ubuntu/
Using following Commands.
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php5.6
but getting following error.
"Unable to locate package php5.6"
"Couldn't find ant package by regex'php5.6' "
Please provide solution.
It was removed from repository. You can`t install it from ondrej/php repository
Ubuntu 14.04 (Trusty), PHP 5.6 and PHP 7.0 going away See also: Ubuntu 14.04 LTS reached end-of-life

How to add curl on php7.2 and ubuntu 14

I am trying to install curl on my ubunutu 14 server with php 7.2 installed. I run the following command:
sudo apt-get install php7.0-curl
but it gives error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0-curl
E: Couldn't find any package by regex 'php7.0-curl'
I then tried to resolve this issue by running commands:
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt install apache2 libapache2-mod-php7.0 php7.0
But that also end up with same "Couldn't find package" error.
Your Ubuntu distro trusty is too old and those packages aren't available. You will have to build the library from the source by yourself.
Here you can find solution your problem How do I install the ext-curl extension with PHP 7?
Shortly, try to execute
sudo apt-get install php-curl
Also you can use sudo apt-cache search curl which shows you available packages for installation.

Unable to install php5-fpm on ubuntu 16.04 digital ocean droplet

I am trying to setup phppgadmin and it requires php5-fpm but as I have ubuntu 16.04 and it comes with php 7. So when i try to run install php5-fpm it give me following error:
sudo apt-get install php5-fpm
Package php5-fpm 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-fpm' has no installation candidate
I can't use php7-fpm as phppgadmin requires only php5-fpm. When I run sudo apt-get install php-fpm it installed php7-fpm . I am using nginx as web server. I tried many ppa but none of them worked for me.
TL;DR: If you want to stay with php5, you will need to stay at Ubuntu 14.04 LTS
You can use phpbrew to install older/different php-version, that are not part of the actual package-repositories of ubutu.
phpbrew builds and installs multiple version php(s) in your $HOME directory.
Another way is to modify the sources.list and a repository which still provides php5 packages. But you really should not do that!
You will need to use a PPA to do this. Consider:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-mbstring php-xdebug libapache2-mod-php5.6
That's PHP5.6, not exactly PHP5-FPM. I don't think FPM is in that PPA but it's a close enough solution. Maybe you can find an FPM PPA but I'm not seeing one at first glance.

Package php5 has no installation candidate on Ubuntu 16.04 LTS

I have upgraded my system to ubuntu 16.04 LTS, now I have issue this newer version install PHP 7 and remove the PHP 5, How I can install PHP 5.4 on ubuntu 16.04 LTS?
I tried:
sudo apt-get install php5
and I got this error:
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
Ubuntu 16.04 comes with PHP7 ,there are no PHP5 packages.
Remove all php7 packages:
sudo aptitude purge `dpkg -l | grep php| awk '{print $2}' |tr "\n" " "
New PPA
sudo add-apt-repository ppa:ondrej/php
Update packages:
sudo apt-get update
Install PHP:
sudo apt-get install php5.6
Check PHP Version:
php -v

Categories