search

Home  >  Q&A  >  body text

Unable to install php7.4-dev on Ubuntu 18.04

<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粉265724930P粉265724930512 days ago742

reply all(1)I'll reply

  • P粉794177659

    P粉7941776592023-09-01 12:27:34

    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

    reply
    0
  • Cancelreply