Trying to install php7.4-dev
extension, but I’m getting
E: Unable to locate package php7.4-dev
E: Couldn't find any package by glob 'php7.4-dev'
E: Couldn't find any package by regex 'php7.4-dev'
When I run apt show php
it displays the following:
Package: php
Version: 1:7.2+60ubuntu1
Priority: optional
Section: php
Source: php-defaults (60ubuntu1)
Origin: Ubuntu
Maintainer: Ubuntu Developers <[email protected]>
Original-Maintainer: Debian PHP Maintainers <[email protected]>
Bugs: https://bugs.launchpad.net/ubuntu/+filebug
Installed-Size: 12.3 kB
Depends: php7.2
Supported: 5y
Download-Size: 3,084 B
APT-Sources: http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages
Description: server-side, HTML-embedded scripting language (default)
PHP (recursive acronym for PHP: Hypertext Preprocessor) is a widely-used
open source general-purpose scripting language that is especially suited
for web development and can be embedded into HTML.
.
This package is a dependency package, which depends on Ubuntu's default
PHP version (currently 7.2).
I used the following commands to update the repository.
sudo add-apt-repository ppa:ondrej/php
sudo apt update
After running apt show php
again, I received the same message as before, and the version remains unchanged, still showing PHP 7.2
.
However, I consistently encounter the same result every time, and unfortunately, I’m unable to install php7.4-dev
.
sudo add-apt-repository ppa:ondrej/php
sudo apt update
apt show php
2
Answers
I was facing the same issue somehow
ppa:ondrej/php
is not working on Ubuntu 18.04. As mentioned in this article after adding following repositories I was able to installphp7.4
I am unable to install FPM using the above PPA can you help with this?
Below is the error:
sudo apt install php74p-fpm
Reading package lists… Done
Building dependency tree
Reading state information… Done
php74p-fpm is already the newest version (7.4.33-0sergeyd6.1~18.04.1).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
2 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up php74-fpm (7.4.33-0sergeyd6.1~18.04.1) …
update-rc.d: error: unable to read /etc/init.d/php74-fpm
dpkg: error processing package php74-fpm (–configure):
installed php74-fpm package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of php74p-fpm:
php74p-fpm depends on php74-fpm; however:
Package php74-fpm is not configured yet.
dpkg: error processing package php74p-fpm (–configure):
dependency problems – leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
Errors were encountered while processing:
php74-fpm
php74p-fpm
E: Sub-process /usr/bin/dpkg returned an error code (1)