Unable to find package php 8.0
Solved
Hello,
I wanted to install php8.0 on Debian using:
Result:
Every time I try to install a package, I get this message about the package not being found. How can I find them?
I wanted to install php8.0 on Debian using:
apt-get install php80.
Result:
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
E: Unable to locate package php8.0
Every time I try to install a package, I get this message about the package not being found. How can I find them?
1 réponse
Hello,
First of all, re-index the list of packages known by APT by running as root:
If you want (but it’s not necessary you can also do an upgrade) as root:
To search for a package, you can use the command
... so the command to run to install it would be:
If the goal is to do a LAMP installation (Linux Apache MySQL PHP) I recommend running directly:
(the package
To go further
Note that there are also two search tools:
Good luck
First of all, re-index the list of packages known by APT by running as root:
apt update
If you want (but it’s not necessary you can also do an upgrade) as root:
apt upgrade
To search for a package, you can use the command
apt search ...(as a user or as root), e.g.
apt search php. Among the (long) list of results, for me there is:
php8.1/testing,testing 8.1.2-1 all
server-side scripting language, included in HTML (meta-package)
... so the command to run to install it would be:
apt install php8.1
If the goal is to do a LAMP installation (Linux Apache MySQL PHP) I recommend running directly:
apt install apache2 default-mysql-server libapache2-mod-php
(the package
libapache2-mod-phpwill install the latest version of PHP as a dependency in addition to what is needed for Apache to use PHP).
To go further
Note that there are also two search tools:
-
apt-cache search ...
(relatively close toapt search
), allows you to search within the packages and their description for a keyword; -
apt-file search ...
(not installed by default) allows you to search within the list of files provided by each package (very useful when you're looking for which package provides a command). Typically, to search for the package that provides the commandls
you would runapt-file search ls | grep bin/ls$
and you would find that it’s the packagecoreutils
... Note that in thegrep
I wrotebin/
which helps to retain all paths that may contain a binary (in the sense of the FHS)/bin
,/sbin
,/usr/bin
,/usr/sbin
.
Good luck