繁体   English   中英

无法在Raspbian上安装php 7.2

[英]Cannot install php 7.2 on Raspbian

我无法在Raspbian上安装php 7.2。 我使用了最后一个Raspbian(发布日期:2017-11-29)和Debian Stretch 9.1: https ://www.raspberrypi.org/downloads/raspbian/

我遵循了https://www.colinodell.com/blog/2016-12/installing-php-7-1中的说明:

apt-get install apt-transport-https lsb-release ca-certificates
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg
echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list
apt-get update

但是当我尝试

apt-get install -y php7.2

得到以下错误:

root@raspberrypi:/home/pi# apt-get install -y php7.2
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies:
 php7.2 : Depends: libapache2-mod-php7.2 but it is not installable or
               php7.2-fpm but it is not installable or
               php7.2-cgi but it is not installable
      Depends: php7.2-common but it is not installable
E: Unable to correct problems, you have held broken packages.

有人可以帮助我吗? 非常感谢

我发现了原因,软件包php7.1和php7.2不在拉伸仓库中:(。

https://raspberrypi.stackexchange.com/questions/70388/how-to-install-php-7-1

必须等待更新...

请检查以下GitHub问题: https : //github.com/oerdnj/deb.sury.org/issues/579

似乎尚未针对ARM体系结构发布用于PHP新版本的Debian软件包。 我想为构建这样的软件包做贡献,但是上一篇文章之后没有关于此问题的任何活动。

安装PHP7.1或更高版本的选择是自己编译并安装。 对于某些示例,您可能需要检查http://yoestuve.es/blog/compile-php-7-for-raspberry-pi-with-memcached/ 我也建议使用checkinstall而不是make install ,以方便以后的卸载。

不幸的是,对于带有拉伸功能的树莓,它看起来似乎没有比PHP 7.0更高的版本。 在这里,您可以看到当前和将来的raspbian版本的PHP版本: https ://packages.debian.org/search ? arch = armhf & searchon = names & keywords = php

您将必须升级到buster,然后才能获得PHP 7.3。 这是如何的: https//www.raspberrypi.org/blog/buster-the-new-version-of-raspbian/

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM