2017-12-05 6 views
1

Raspbian에 php 7.2를 설치할 수 없습니다. 나는 마지막 Raspbian (출시일 : 2017년 11월 29일) 사용과를 데비안 스트레치 9.1 :Raspbian에 PHP 7.2를 설치할 수 없습니다.

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 
: 나는 https://www.colinodell.com/blog/2016-12/installing-php-7-1의 지침을 따라 https://www.raspberrypi.org/downloads/raspbian/

A가 다음 오류를받습니다.

[email protected]:/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. 

누군가 나를 도울 수 있습니까? 덕분에 많은

+0

ARM 바이너리를 제공하는 저장소입니까? 확실하지 않습니다. 설치 이유가 없습니다. –

+0

편집 : 분명히 그렇습니다. 'lsb_release -sc'가 "stretch"를 리턴했는지 확인 했습니까? 'apt-get update '도이 repo를 다운로드 했습니까? –

+0

예, "Stretch"를 반환합니다. – dicotout

답변

1

나는 이유, 패키지 php7.1과 php7.2은 스트레치의 repo :(아닌를 발견했다.

https://raspberrypi.stackexchange.com/questions/70388/how-to-install-php-7-1이있으세요 업데이 트를 기다리는 ...

+0

그것이 정확히'https : // packages.sury.org/php /'저장소를 추가 한 이유입니다. 결과적으로 apt는 (기본) 확장이 아닌 sury.org 저장소에서 php를 다운로드해야합니다. 나는 스트레치에 php7.1을 여러 번 설치했다. (PHP는 전체 스트레치 수명 동안 7.0으로 유지 될 가능성이 매우 높다.) –

+0

스트레칭의 경우 php7.1 및 php7.1-xsl 만 있습니다. sury.org repo에서 7.2와 동일합니다. –

1

이 GitHub의 문제를 확인하십시오. https://github.com/oerdnj/deb.sury.org/issues/579

새로운 PHP 버전에 대한 데비안 패키지가 아직 ARM 아키텍처 용으로 해제되지 않은 것 같다을,691을이러한 패키지를 제작하는 데 기여하고 싶지만 마지막 게시물 이후에 문제에 대한 활동이 없습니다.

PHP7.1 이상을 설치하는 옵션은 직접 컴파일하고 설치하는 것입니다. 몇 가지 예를 들면 http://yoestuve.es/blog/compile-php-7-for-raspberry-pi-with-memcached/을 확인하는 것이 좋습니다. 나중에 쉽게 제거하기 쉽도록 make install 대신 checkinstall을 사용하도록 제안합니다.