Couldn't find any package by glob 'php8.0' in debian

Couldn't find any package by glob 'php8.0' in debian

  1. Blog
  2. 15 November 2026
  3. 3 min read

Stefan Bogdanescu

Founder & Senior Architect

The Debian Package Naming Conflict

The error message E: Couldn't find any package by glob 'php8.0' is a classic symptom of attempting to use Ubuntu-centric package management on a Debian-based distribution without understanding the underlying repository structure. You are running Kali Linux, which is based on Debian 10 (Buster), but you have added Ondřej Surý's Personal Package Archive (PPA). This specific combination creates an immediate incompatibility that prevents apt from resolving your request.

The root cause lies in how Ubuntu and Debian handle PHP versions differently. Ondřej Surý maintains a PPA specifically for Ubuntu (ppa:ondrej/php). In the Ubuntu ecosystem, it is standard practice to name packages using major version numbers, such as php8.0. However, Debian-based systems, including Kali Linux, strictly follow Debian policy regarding package naming. Debian repositories do not include the version number in the primary package name; instead, they use names like php8.1 or simply php depending on the specific build and codename.

When you attempt to install php8.0 via apt, the system looks for a package with that exact name in its configured sources. Because Debian repositories do not host a package literally named php8.0, and your added PPA is designed exclusively for Ubuntu's .deb packages (which are often re-packaged or structured differently to satisfy Ubuntu dependencies), the glob search fails immediately. The error confirms that no repository currently serves a file matching that string in the expected location.

To resolve this, you must align your installation command with the package names available in Debian repositories. On Debian 10 Buster, PHP 8.x is typically not available via the default repositories, nor is it usually packaged as php8.X in third-party Debian mirrors without explicit versioning support that matches Ubuntu's schema. If you require a specific PHP version on Kali Linux, you generally need to add Ondřej Surý's Debian repository or use the official Debian backports if available for your specific codename.

You can verify the correct package name by running:

apt search php8

Look for entries that end in .deb rather than .dpkg (though apt handles both) and check the version string carefully. On many Debian 10 systems, you might find a package named php8.1 if the maintainer has updated their release cycle to match the major version, but php8.0 specifically is often deprecated or simply not present if the repository only supports newer LTS releases.

If your goal is to install PHP 8 for a Laravel project, note that Laravel 9 and above require PHP 8.1 or higher. Attempting to force an older PHP 8.0 environment on a modern Debian base can lead to dependency hell, especially if you are relying on specific extensions like mbstring or openssl which might have version constraints that break under mixed repository management.

The safest path forward is to update your Kali Linux base to the latest point release (Kali Rolling) and then add the appropriate Ondřej Surý Debian repository, ensuring you use the correct GPG key for Debian rather than the Ubuntu one. Once the source list is corrected to reflect Debian's naming conventions, apt will locate the package under its actual identifier, resolving the glob error without manual intervention.

Our network