簡體   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