php 7.3 Unable to locate package php7.3-gd - php

I'm trying to install the php7.3-gd extension.
When I try to: sudo apt-get install -y php7.3-gd
I recieve the output:
Reading package lists... Done
Building dependency tree
Reading state information... Done
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 tried to update my repo using the following awnser but to no avail.
Edit: I'm on ubuntu 19.08

php7.3-gd is available on Ubuntu 19.10.
First, you need upgrade your ubuntu to 19.10:
sudo do-release-upgrade -d
And then you can install it:
sudo apt install php7.3-gd

Related

Can't install php8.0-curl on Ubuntu 21.10

I'm trying to install php8.0-curl on my server.
But it keeps giving me the following error:
$ sudo apt install php8.0-curl
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package php8.0-curl
E: Couldn't find any package by glob 'php8.0-curl'
I followed the following steps, but with no success.
sudo add-apt-repository ppa:ondrej/php
sudo apt update
sudo apt install curl
sudo apt install php8.0-curl
I was using the wrong repositories.
Following this answer solved the issue.
https://serverfault.com/a/1106701

E: Unable to locate package php7.2-bcmath

I'm trying to install package php7.2-bcmath on Ubuntu 14.4
sudo apt-get install php7.2-bcmath
but I keep getting this error:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.2-bcmath
E: Couldn't find any package by regex 'php7.2-bcmath'
I already try those options:
sudo apt-add-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.2-bcmath
add this to /etc/apt/sources.list:
deb http://security.ubuntu.com/ubuntu artful-security main universe
Nothing works!
Please help
You should check which PHP version is available and if you addressed the correct package name.
Use:
apt-cache search php
to check, if PHP7.2 and all the extensions are available at your environment.
Determine the correct package name of the bcmath package by searching trough all available packages:
apt-cache search php | grep bcmath
If you see an bcmath package for php7.2 use this name with the sudo apt-get install .... syntax.

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.

Ubuntu 14.04: Unable to locate package php7.0-zip

I am not being able to install package php7.0-zip. The error I get after doing
sudo apt-get install php7.0-zip
Is:
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.0-zip
E: Couldn't find any package by regex 'php7.0-zip'
This is for an Ubuntu 14.04.5 LTS. My PHP version is 7.0.17.
I tried doing:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
And still getting the same "unable to locate" error.
I expect to solve my "Fatal error: Class 'ZipArchive' not found in" in Laravel 5.4, after installing zip package.
if you do sudo apt-cache search php7.0-* you should get a list of all packages.
The zip module should be at the bottom
If it isn't there you might wish to try
sudo add-apt-repository ppa:ondrej/php && sudo apt-get update instead of just add-apt-repository ppa:ondrej/php and see if that makes a difference.
Finally I couldn't find the package because I was using Ubuntu 14.04, and as is an unsupported Ubuntu version, there is no more php packages in the repository.

Install mysql pdo for php 7.1 for Ubuntu

I'm trying to install pdo mysql on ubuntu for php 7.1
sudo apt-get install php7.1-mysql
But I got E: Unable to locate package php7.1-mysql
Then I tried install from ondrej repository
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.1-mysql
Still I got
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php7.1-mysql
E: Couldn't find any package by regex 'php7.1-mysql'
At the moment I haven't got any pdo modules enabled;
Can someone help please?

Categories