brew install homebrew/php/php56 giving me an error - php

Hi I am trying to install homebrew php56 on ubuntu 14.04
I installed php 5.6 and apache2 and other dependencies of installation like perl, curl , etc.
But still I am getting this error.

That's rather a freaky way — install something on Ubuntu Linux through homebrew — it's actually should not work.
You'd better use apt package manager. You can install php-5.6 binaries from PPA:
sudo apt-get update && sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php5-5.6
sudo apt-get update && sudo apt-get upgrade
sudo apt-get install php5

Related

php7.3 on Ubuntu 18.04 using ppa:ondrej/php wants to install apache2 on upgrade

I wanted to install php7.3 on Ubuntu 18.04 using the following ppa:
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3-fpm
So far it worked flawlessly, but when I do apt upgrade now it forces me to install apache2-bin and php8.0, which I do not want as I am using Nginx.
How can I upgrade now without installing new packages I do not want?
apt upgrade install(update) also dependenc packages.. try upgrade manually sudo apt --only-upgrade install Package or use apt-mark hold Package - this will prevent the package from being automatically installed, upgraded or removed
original source

How can i downgrade the PHP 7.2.xx version to 7.1.XX or 7.0.xx on EC2 Linux 2

I am new to EC2. I have installed the latest php version which 7.2.22 . But my php files are in supported in latest version. So whether running the file in php in ec2 linux 2 its not working. So i have decide to downgrade php 7.2 to php 7.1.xx or php 7.0.xx.
How to Downgrade it. or else How can i uninstall php 7.2.xx and reinstall php 7.1.xx or php 7.0.xx
Please give the command to better understands and execute the commands to check.
Thanks in Advance...
I am instructing the command in ubuntu,
Command will differ wrt. to OS
Please purge the 7.2 php than Re-install 7.0 or 7.1
sudo apt-get purge php7.0-common
Install php 7.1
sudo apt-get install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.1
Install php 7.0
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.0
Hope it helps .....!!!

Installation of php5-gmp on Ubuntu 16.04

Is there a way to find and install the php5-gmp module on Ubuntu 16.04? I looked for this repository but I can't find it here. In fact, when I tried to do:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php5-gmp
The results is:
Unable to find php5-gmp package
Try php5.6-gmp:
sudo apt install php5.6-gmp
Obvously this will only install gmp extension for PHP5.6.
If you want it to 7.0, use the right package name:
sudo apt install php7.0-gmp

How to install php-curl in Ubuntu 16.04

Upgraded to Ubuntu 16.04 and facing problem after installing PHP5.
Installed PHP-5 with following:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install php5.5 # for PHP 5.5
Trying to install php-curl but its not working.
sudo apt-get install php5-curl
Error: E: Unable to locate package php5-curl
In Ubuntu 16.04 default PHP version is 7.0, if you want to use different version then you need to install PHP package according to PHP version:
PHP 7.4: sudo apt-get install php7.4-curl
PHP 7.3: sudo apt-get install php7.3-curl
PHP 7.2: sudo apt-get install php7.2-curl
PHP 7.1: sudo apt-get install php7.1-curl
PHP 7.0: sudo apt-get install php7.0-curl
PHP 5.6: sudo apt-get install php5.6-curl
PHP 5.5: sudo apt-get install php5.5-curl
This worked for me.
sudo apt-get install php-curl
This works for me:
sudo apt-get install php5.6-curl
Do:
apt-get update
And then:
apt-get install php5-curl
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php8.0-curl
To Install cURL 7.49.0 on Ubuntu 16.04 and Derivatives
wget http://curl.haxx.se/download/curl-7.49.0.tar.gz
tar -xvf curl-7.49.0.tar.gz
cd curl-7.49.0/
./configure
make
sudo make install
For Ubuntu 18.04 or PHP 7.2 users you can do:
apt-get install php7.2-curl
You can check your PHP version by running php -v to verify your PHP version and get the right curl version.
sudo apt-get install php5.6-curl
and restart the web browser.
You can check the modules by running php -m | grep curl

install php70-gd on ubuntu

Recently the new php7 has been released. However, when I am trying to install the gd package, the library can not be found.
I have tried through
sudo apt-get install php70-gd
and
sudo apt-get install php70-php-gd
Does anybody have an idea if gd is available for php 7?
PHP7 packages for Ubuntu including php7.0-gd can be installed via PPA for PHP by Ondřej Surý:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
Next, install the desired version:
sudo apt-get install php7.0-gd
# or
sudo apt-get install php7.1-gd
# or
sudo apt-get install php7.2-gd
# or
sudo apt-get install php7.3-gd
# or
sudo apt-get install php7.4-gd
EDIT:
As MacroMan stated, under Ubuntu 16.04 you don't need to add the repository any more. Simply issuing sudo apt-get install php7.0-gd works.
just try
sudo apt-get install php7.0-gd
i got it working that way.
Greetings.
In 2018, there is an alias package for this:
sudo apt-get install php-gd
Use this to retrieve the last version.
my php version is 7.1
sudo apt-get install php7.1-gd
this command is work for me
For
Ubuntu 16.04.4 LTS
this is the command:
sudo apt-get install php7.0-gd
check php verison first using
php -v
It will give version number suppose your version is 7.0.1 then use this command to install GD Library
sudo yum install php70-gd
OR use this command depending upon server specification
sudo apt-get install php7.0-gd

Categories