Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/297.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
无法在Raspbian上安装php 7.2_Php_Debian_Raspbian - Fatal编程技术网

无法在Raspbian上安装php 7.2

无法在Raspbian上安装php 7.2,php,debian,raspbian,Php,Debian,Raspbian,我无法在Raspbian上安装PHP7.2。 我使用了最后一个Raspbian(发布日期:2017-11-29)和Debian Stretch 9.1: 我按照以下指示行事: 但是当我尝试的时候 apt-get install -y php7.2 A获取以下错误: root@raspberrypi:/home/pi# apt-get install -y php7.2 Reading package lists... Done Building dependency tree R

我无法在Raspbian上安装PHP7.2。 我使用了最后一个Raspbian(发布日期:2017-11-29)和Debian Stretch 9.1:

我按照以下指示行事:

但是当我尝试的时候

apt-get install -y php7.2
A获取以下错误:

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不在拉伸回购中:(


必须等待更新…

请检查此GitHub问题:

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


安装PHP7.1或更新版本的一个选项是自己编译并安装。对于某些示例,您可能需要检查。我还建议使用
checkinstall
,而不是
makeinstall
,以便于以后更轻松地卸载。

不幸的是,看起来不会有比PHP7.1更高的版本PHP7.0,用于带stretch的raspberrys。在这里,您可以看到当前和未来raspbian版本的PHP版本:

您必须升级到buster,然后才能获得PHP 7.3。以下是如何:

此存储库是否提供ARM二进制文件?我不确定,这可能是您无法安装它的原因。编辑:显然是这样。您是否检查了
lsb_release-sc
是否返回了“stretch”?
apt get update
是否也下载了此repo?是的,它返回了“stretch”。您至少可以重试安装
php7.1
吗?
sudo-apt-get-update&&sudo-apt-get-upgrade&&sudo-apt-get-install-php7.1
结果完全相同:以下软件包具有未满足的依赖项:php7.1:依赖项:libapache2-mod-php7.1但它不可安装或php7.1-fpm但它不可安装或php7.1-cgi但不可安装取决于:php7.1-common但不可安装E:无法纠正问题,您持有损坏的软件包。这正是您添加
https://packages.sury.org/php/
repo。因此,apt应该从sury.org存储库下载php,而不是(默认)stretch one。我在stretch上安装了好几次php7.1(在整个stretch生命周期中,php很可能保持在7.0)。对于stretch,只有php7.1和php7.1-xsl。sury.org repo中的7.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.