User avatar
zikmir
Posts: 15
Joined: Mon Jan 02, 2017 12:22 am
Location: New Brunswick
Contact: Website

Apache2 and php7.1 on Raspbian Stretch

Thu Oct 19, 2017 4:52 am

pi@raspberrypi:~ $ sudo nano /etc/apt/sources.listpi@raspberrypi:~ $ sudo apt-get install php7.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
php7.1 is already the newest version (7.1.10-1+0~20170929170631.9+jessie~1.gbp501135).
0 upgraded, 0 newly installed, 0 to remove and 1 not upgraded.
26 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up php7.1-common (7.1.10-1+0~20170929170631.9+jessie~1.gbp501135) ...
/usr/bin/ucf: line 230: 7710 Segmentation fault cp -pf "${statedir}/hashfile.${i}" "${statedir}/hashfile.$(($i+1))"
dpkg: error processing package php7.1-common (--configure):
subprocess installed post-installation script returned error exit status 139
dpkg: dependency problems prevent configuration of php7.1-readline:
php7.1-readline depends on php7.1-common (= 7.1.10-1+0~20170929170631.9+jessie~1.gbp501135); however:
Package php7.1-common is not configured yet.

dpkg: error processing package php7.1-readline (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.1:
php7.1 depends on php7.1-common; however:
Package php7.1-common is not configured yet.

dpkg: error processing package php7.1 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.1-cli:
php7.1-cli depends on php7.1-common (= 7.1.10-1+0~20170929170631.9+jessie~1.gbp501135); however:
Package php7.1-common is not configured yet.
php7.1-cli depends on php7.1-readline; however:
Package php7.1-readline is not configured yet.

dpkg: error processing package php7.1-cli (--configure):
dependency problems - leaving unconfigured
Setting up php7.0-common (7.0.19-1) ...
/usr/bin/ucf: line 230: 7782 Segmentation fault cp -pf "${statedir}/hashfile.${i}" "${statedir}/hashfile.$(($i+1))"
dpkg: error processing package php7.0-common (--configure):
subprocess installed post-installation script returned error exit status 139
dpkg: dependency problems prevent configuration of php7.1-json:
php7.1-json depends on php7.1-common (= 7.1.10-1+0~20170929170631.9+jessie~1.gbp501135); however:
Package php7.1-common is not configured yet.

dpkg: error processing package php7.1-json (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.1-opcache:
php7.1-opcache depends on php7.1-common (= 7.1.10-1+0~20170929170631.9+jessie~1.gbp501135); however:
Package php7.1-common is not configured yet.

dpkg: error processing package php7.1-opcache (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php7.1:
libapache2-mod-php7.1 depends on php7.1-cli; however:
Package php7.1-cli is not configured yet.
libapache2-mod-php7.1 depends on php7.1-common (= 7.1.10-1+0~20170929170631.9+jessie~1.gbp501135); however:
Package php7.1-common is not configured yet.
libapache2-mod-php7.1 depends on php7.1-json; however:
Package php7.1-json is not configured yet.
libapache2-mod-php7.1 depends on php7.1-opcache; however:
Package php7.1-opcache is not configured yet.

dpkg: error processing package libapache2-mod-php7.1 (--configure):
dependency problems - leaving unconfigured
Setting up php5-common (5.6.22+dfsg-2+b3) ...
/usr/bin/ucf: line 230: 7852 Segmentation fault cp -pf "${statedir}/hashfile.${i}" "${statedir}/hashfile.$(($i+1))"
dpkg: error processing package php5-common (--configure):
subprocess installed post-installation script returned error exit status 139
dpkg: dependency problems prevent configuration of php7.0-mysql:
php7.0-mysql depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-mysql (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-fpm:
php5-fpm depends on php5-common (= 5.6.22+dfsg-2+b3); however:
Package php5-common is not configured yet.

dpkg: error processing package php5-fpm (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-readline:
php7.0-readline depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-readline (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-opcache:
php7.0-opcache depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-opcache (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0:
php7.0 depends on php7.0-common; however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libapache2-mod-php7.0:
libapache2-mod-php7.0 depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.
libapache2-mod-php7.0 depends on php7.0-opcache; however:
Package php7.0-opcache is not configured yet.

dpkg: error processing package libapache2-mod-php7.0 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-gd:
php7.0-gd depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-gd (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-mcrypt:
php7.0-mcrypt depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-mcrypt (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-curl:
php7.0-curl depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-curl (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-cli:
php7.0-cli depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.
php7.0-cli depends on php7.0-opcache; however:
Package php7.0-opcache is not configured yet.
php7.0-cli depends on php7.0-readline; however:
Package php7.0-readline is not configured yet.

dpkg: error processing package php7.0-cli (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-fpm:
php7.0-fpm depends on php7.0-cli; however:
Package php7.0-cli is not configured yet.
php7.0-fpm depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.
php7.0-fpm depends on php7.0-opcache; however:
Package php7.0-opcache is not configured yet.

dpkg: error processing package php7.0-fpm (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-json:
php5-json depends on phpapi-20131226; however:
Package phpapi-20131226 is not installed.
Package php5-common which provides phpapi-20131226 is not configured yet.

dpkg: error processing package php5-json (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-xmlrpc:
php7.0-xmlrpc depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-xmlrpc (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-readline:
php5-readline depends on phpapi-20131226; however:
Package phpapi-20131226 is not installed.
Package php5-common which provides phpapi-20131226 is not configured yet.
php5-readline depends on php5-common (= 5.6.22+dfsg-2+b3); however:
Package php5-common is not configured yet.

dpkg: error processing package php5-readline (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-imap:
php7.0-imap depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-imap (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php7.0-json:
php7.0-json depends on php7.0-common (= 7.0.19-1); however:
Package php7.0-common is not configured yet.

dpkg: error processing package php7.0-json (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of php5-cli:
php5-cli depends on php5-common (= 5.6.22+dfsg-2+b3); however:
Package php5-common is not configured yet.
php5-cli depends on php5-json; however:
Package php5-json is not configured yet.

dpkg: error processing package php5-cli (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
php7.1-common
php7.1-readline
php7.1
php7.1-cli
php7.0-common
php7.1-json
php7.1-opcache
libapache2-mod-php7.1
php5-common
php7.0-mysql
php5-fpm
php7.0-readline
php7.0-opcache
php7.0
libapache2-mod-php7.0
php7.0-gd
php7.0-mcrypt
php7.0-curl
php7.0-cli
php7.0-fpm
php5-json
php7.0-xmlrpc
php5-readline
php7.0-imap
php7.0-json
php5-cli
E: Sub-process /usr/bin/dpkg returned an error code (1)

I had first tried php5 from the same tutorial of setting up apache2. Both yield the same issue. What is going on?
Electrical and Computer Engineer
Interests: HDL Languages, C, Python, Power Systems/Electronics, Embedded Systems

User avatar
DougieLawson
Posts: 30163
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website

Re: Apache2 and php7.1 on Raspbian Stretch

Thu Oct 19, 2017 5:26 pm

Start with
sudo apt purge -y php5* libapache2-mod-php5
Then
sudo apt install -y libapache2-mod-php7* php7.0-cli
Microprocessor, Raspberry Pi & Arduino Hacker
Mainframe database troubleshooter
MQTT Evangelist
Twitter: @DougieLawson

Since 2012: 1B*5, 2B*2, B+, A+, Zero*2, 3B*3

Please post ALL technical questions on the forum. Do not send private messages.

Return to “Raspbian”

Who is online

Users browsing this forum: No registered users and 32 guests