What should I do if ubuntu cannot install php5?

藏色散人
Release: 2023-03-09 08:48:01
Original
2498 people have browsed it

ubuntu cannot install php5 because there is no php5 in the official software library of ubuntu16.04 and only comes with php7. The solution is to install 14.04 or use PPA.

What should I do if ubuntu cannot install php5?

The operating environment of this article: ubuntu16.04 system, PHP5 version, DELL G3 computer

Unable to install php5 under ubuntu16.04 Problem Solving

Since the previous project was written in php5, if you want to deploy it on a system upgraded to ubuntu16.04, you must install the php5 version. After running the following command, you will find the following prompt:

lhs@taing:/var/www/html$ sudo apt-get install php5
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'php5' has no installation candidate
lhs@taing:/var/www/html$ sudo apt-get install libapache2-mod-php5
Reading package lists... Done
Building dependency tree... 50%
Building dependency tree       
Reading state information... Done
Package libapache2-mod-php5 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'libapache2-mod-php5' has no installation candidate
Copy after login

The reason for this error message is that there is no php5 in the 16.04 official software library, only php7. If you want to install php5, you need to install 14.04 or use PPA.

[Recommended learning: PHP video tutorial]

The above is the detailed content of What should I do if ubuntu cannot install php5?. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!