[英]Unable to install php5-fpm on ubuntu 16.04 digital ocean droplet
I am trying to setup phppgadmin and it requires php5-fpm but as I have ubuntu 16.04 and it comes with php 7. So when i try to run install php5-fpm it give me following error: 我正在尝试设置phppgadmin,它需要php5-fpm,但是由于我有ubuntu 16.04,并且它附带了php7。因此,当我尝试运行install php5-fpm时,出现以下错误:
sudo apt-get install php5-fpm
Package php5-fpm 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-fpm' has no installation candidate
I can't use php7-fpm as phppgadmin requires only php5-fpm. 我不能使用php7-fpm,因为phppgadmin仅需要php5-fpm。 When I run sudo apt-get install php-fpm it installed php7-fpm .
当我运行sudo apt-get install php-fpm时,它安装了php7-fpm。 I am using nginx as web server.
我正在使用nginx作为Web服务器。 I tried many ppa but none of them worked for me.
我尝试了很多PPA,但没有一个对我有用。
TL;DR: If you want to stay with php5, you will need to stay at Ubuntu 14.04 LTS
TL; DR:如果您想使用php5,则需要使用Ubuntu 14.04 LTS
You can use phpbrew to install older/different php-version, that are not part of the actual package-repositories of ubutu. 您可以使用phpbrew安装较旧/不同的php-version,这不是ubutu实际软件包存储库的一部分。 phpbrew builds and installs multiple version php(s) in your $HOME directory.
phpbrew在$ HOME目录中构建并安装多个版本的php。
Another way is to modify the sources.list
and a repository which still provides php5 packages. 另一种方法是修改
sources.list
和一个仍提供php5软件包的存储库。 But you really should not do that! 但是您真的不应该这样做!
You will need to use a PPA to do this. 您将需要使用PPA来执行此操作。 Consider:
考虑:
sudo add-apt-repository ppa:ondrej/php
sudo apt-get update
sudo apt-get install php7.0 php5.6 php5.6-mysql php-gettext php5.6-mbstring php-mbstring php-xdebug libapache2-mod-php5.6
That's PHP5.6, not exactly PHP5-FPM. 那是PHP5.6,不完全是PHP5-FPM。 I don't think FPM is in that PPA but it's a close enough solution.
我认为FPM不在PPA中,但这是一个足够接近的解决方案。 Maybe you can find an FPM PPA but I'm not seeing one at first glance.
也许您可以找到FPM PPA,但乍一看却看不到。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.