This question already has answers here:
Cannot add PPA: 'ppa:ondrej/php5-5.6'
(4 answers)
Closed 1 year ago.
currently I want to update my old php 5.6 application in ubuntu xenial 16.04.6 with php5.6-zip extension.
sudo apt-get install php5.6-zip
E: Unable to locate package php5.6-zip E: Couldn't find any package by glob 'php5.6-zip' E: Couldn't find any package by regex 'php5.6-zip'
tried to add the ppa repository sudo add-apt-repository -y ppa:ondrej/php5-5.6
The user named '~ondrej' has no PPA named 'ubuntu/php5-5.6'
Then tried to run sudo add-apt-repository -y ppa:ondrej/php and
sudo apt-get install php5.6-zip
still got the unable to locate package php5.6-zip error. Btw there is no php5.6-zip from apt-cache policy php5.6 command. Does anyone have solution regarding this problem? your help would be much appreciated. Thank you
As far as I know you can't install from zip using "apt-get install". Since the zip file contains the build files. To install it use this instead, this should work.
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
And this to see versions
php -v
Related
devall#giga:~$ sudo apt-get install php7.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.1
E: Couldn't find any package by glob 'php7.1'
E: Couldn't find any package by regex 'php7.1'
I am trying to install php 7.1 , tried almost everything...
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
reinstalled ubuntu twice.. still same error. #help
try with software-properties-common
sudo apt install software-properties-common
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt search php7
sudo apt install php7.1
php -v
I get the error from my cakephp 2.x project:
The PHP GD extension is required, but is not installed.
I use php7.3 with apache on debian
I search and find
apt-get install php7.3-gd
I tried this but i only get following error:
E: Unable to locate package php7.3-gd
E: Couldn't find any package by glob 'php7.3-gd'
E: Couldn't find any package by regex 'php7.3-gd'
I searched again, but didnt find a soulution for this problem only for ubunto and nothing else worked. I hope someone could help me with this problem.
It looks like you do not have the appropriate repo added. Try :
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3-gd
#Will's answer did not work for me, I then replace the first command from sudo add-apt-repository ppa:ondrej/php to sudo apt-add-repository ppa:ondrej/php and it works for me. So finally I run:
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install -y php7.3-gd
I'm using php7.1 on Ubuntu 17.04, I have tried to install cURL using this command:
sudo apt-get install php-curl
but I get this:
Package 'php-curl' has no installation candidate
I tried also to specify the cURL version using:
sudo apt-get install php7.1-curl
but i got
E: Couldn't find any package by regex 'php7.1-curl
So, please, how do I install curl for PHP 7.1?
You need to add PHP ppa first, update, and install
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt install php7.1-curl
While it seems strange that you are not able to find php-curl, you should search for php curl package version available on your system:
sudo apt update
sudo apt search ^php
Between the results, it should display something like this (the output was taken from Ubuntu 17.10, yours will be different):
php7.1-curl/artful-updates,artful-security 7.1.15-0ubuntu0.17.10.1 amd64
CURL module for PHP
then, you just install it as usual:
sudo apt install php7.1-curl
happy coding!
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
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