Unable to install php7.4-dev on Ubuntu 18.04
P粉265724930
P粉265724930 2023-08-31 15:06:53
0
1
702
<p>Trying to install the <code>php7.4-dev</code> extension, but getting the following error: </p> <pre class="brush:php;toolbar:false;">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'</pre> <p>When I run <code>apt show php</code>, the following is displayed: </p> <pre class="brush:php;toolbar:false;">Package: php Version: 1:7.2 60ubuntu1 Priority: optional Category: php Source: php-defaults (60ubuntu1) Source: Ubuntu Maintained by: Ubuntu Developers <ubuntu-devel-discuss@lists.ubuntu.com> Original maintainer: Debian PHP Maintainers <pkg-php-maint@lists.alioth.debian.org> 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). </pre> <p>I updated the software source using the following command: </p> <pre class="brush:php;toolbar:false;">sudo add-apt-repository ppa:ondrej/php sudo apt update</pre> <p>After running <code>apt show php</code> again, I received the same message as before, the version still hadn't changed and it still showed <code>PHP 7.2</code>. </p> <p>However, I get the same result every time, and unfortunately, I cannot install <code>php7.4-dev</code>. </p> <p>sudo add-apt-repository ppa:ondrej/php sudo apt update apt display php</p>
P粉265724930
P粉265724930

reply all(1)
P粉794177659

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 in this article, after adding the following repository, I successfully installed php7.4

sudo add-apt-repository ppa:sergey-dryabzhinsky/php74
sudo add-apt-repository ppa:sergey-dryabzhinsky/php7-modules
sudo add-apt-repository ppa:sergey-dryabzhinsky/backports
sudo add-apt-repository ppa:sergey-dryabzhinsky/packages
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template