Trying to install the php7.4-dev
extension, but getting the following error:
E: Unable to locate package php7.4-dev E: Unable to find any packages via glob 'php7.4-dev' E: Unable to find any package via regex 'php7.4-dev'
When I run apt show php
, the following is displayed:
Package: php Version: 1:7.2 60ubuntu1 Priority: optional Category: php Source: php-defaults (60ubuntu1) Source: Ubuntu Maintained by: Ubuntu DevelopersOriginal maintainer: Debian PHP Maintainers Bug: https://bugs.launchpad.net/ubuntu/ filebug Installed size: 12.3 kB Dependencies: php7.2 Support: 5 years Download size: 3,084 B APT source: http://archive.ubuntu.com/ubuntu bionic/main amd64 Packages Description: Server-side, HTML-embedded scripting language (default) PHP (recursive abbreviation for PHP: Hypertext Preprocessor) is a widely used open source general-purpose scripting language, especially suitable for web development and can be embedded in HTML. . This package is a dependency package and depends on Ubuntu's default PHP version (currently 7.2).
I updated the software source using the following command:
sudo add-apt-repository ppa:ondrej/php sudo apt update
After running apt show php
again, I received the same message as before, the version still hadn't changed and it still showed PHP 7.2
.
However, I get the same result every time, and unfortunately, I cannot install php7.4-dev
.
sudo add-apt-repository ppa:ondrej/php sudo apt update apt display php
I ran into the same problem to some extent and for some reason
ppa:ondrej/php
didn't work on Ubuntu 18.04. As mentioned inthis article, after adding the following repository, I successfully installedphp7.4