无法在 16.04 上安装 php5

无法在 16.04 上安装 php5

我无法安装php5。你能帮忙吗?

root@localhost:~# 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

root@localhost:~# sudo apt-get install libapache2-mod-php5
Reading package lists… Done
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

is only available from another source

E: Package 'php5' has no installation candidate

i need to install all this.

In root we install the dependencies:
----Apache & php quick install---------------------------------
sudo apt-get install apache2
sudo apt-get install php5
sudo apt-get install libapache2-mod-php5

linux:/root# sudo apt-get install curl libcurl3 libcurl3-dev php5-curl
linux:/root# sudo apt-get install php5-gd
linux:/root# sudo apt-get install php5-dev php5-pgsql
linux:/root# sudo apt-get install libpqxx-3.1 libpqxx3-dev

You can always find the available libpqxx version with searching:

linux:/root# sudo apt-cache search libpqxx

Restarting apache:
sudo /etc/init.d/apache2 restart

We install postgresql:

linux:/root# sudo apt-get install libreadline-dev

相关内容