Updating DietPi has broken Nextcloud installation Topic is solved

Have some feedback, questions, suggestions, or just fancy a chat? Pop it in here.
gobstopper
Posts: 30
Joined: Sun Jul 14, 2019 5:05 pm

Re: Updating DietPi has broken Nextcloud installation

Post by gobstopper »

Hi -

First two commands ran through without any real problems to report.

The third, more complex, returned this -

Code: Select all

apt install --reinstall --allow-downgrades $(dpkg --get-selections '*php*' | mawk '{print $1}')
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reinstallation of php-common is not possible, it cannot be downloaded.
Reinstallation of php7.3-cli is not possible, it cannot be downloaded.
Reinstallation of php7.3-common is not possible, it cannot be downloaded.
Reinstallation of php7.3-fpm is not possible, it cannot be downloaded.
Reinstallation of php7.3-gd is not possible, it cannot be downloaded.
Reinstallation of php7.3-intl is not possible, it cannot be downloaded.
Reinstallation of php7.3-json is not possible, it cannot be downloaded.
Reinstallation of php7.3-mbstring is not possible, it cannot be downloaded.
Reinstallation of php7.3-mysql is not possible, it cannot be downloaded.
Reinstallation of php7.3-opcache is not possible, it cannot be downloaded.
Reinstallation of php7.3-readline is not possible, it cannot be downloaded.
Reinstallation of php7.3-xml is not possible, it cannot be downloaded.
Reinstallation of php7.3-zip is not possible, it cannot be downloaded.
0 upgraded, 0 newly installed, 3 reinstalled, 0 to remove and 0 not upgraded.
Need to get 201 kB of archives.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n]
Get:1 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php-apcu armhf 5.1.17+4.0.11-1 [39.2 kB]
Get:2 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php-igbinary armhf 3.0.0-1 [58.0 kB]
Get:3 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php-redis armhf 4.2.0-1 [104 kB]
Fetched 201 kB in 1s (272 kB/s)
(Reading database ... 28608 files and directories currently installed.)
Preparing to unpack .../php-apcu_5.1.17+4.0.11-1_armhf.deb ...
Unpacking php-apcu (5.1.17+4.0.11-1) over (5.1.17+4.0.11-1) ...
Preparing to unpack .../php-igbinary_3.0.0-1_armhf.deb ...
Unpacking php-igbinary (3.0.0-1) over (3.0.0-1) ...
Preparing to unpack .../php-redis_4.2.0-1_armhf.deb ...
Unpacking php-redis (4.2.0-1) over (4.2.0-1) ...
Setting up php-apcu (5.1.17+4.0.11-1) ...
Setting up php-igbinary (3.0.0-1) ...
Setting up php-redis (4.2.0-1) ...
Processing triggers for php7.3-fpm (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Processing triggers for php7.3-cli (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
root@DietPi:~#
The only observation I can make is the presence of the series of ".... is not possible, it cannot be downloaded." messages before prompting me if I wanted to contiune.

This got me back to the point of my Nov 8th 3:39pm post - with the Nextcloud site returning the PHP curl error, so I thought I'd try the steps in the 7:49pm response from @Joulinar. However this returned the same error as before.

I've tried to repeat the other suggestions in subsequent posts, but I'm basically back to the point where I can hit the /nextcloud URL but it displays that PHP error.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: Updating DietPi has broken Nextcloud installation

Post by Joulinar »

Probably all PHP packages would need to be purged first as it seems a reinstall is not possible. @MichaIng your thoughts?
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: Updating DietPi has broken Nextcloud installation

Post by MichaIng »

The error message seems strange, I would have expected something different in case of package incompatibilities. Better not purging the packages to keep config files in place, let's go a conservative approach:

Code: Select all

packages=$(dpkg --get-selections '*php*' | mawk '{print $1}')
dpkg -r --force-depends $packages
apt install $packages
gobstopper
Posts: 30
Joined: Sun Jul 14, 2019 5:05 pm

Re: Updating DietPi has broken Nextcloud installation

Post by gobstopper »

Ran your commands - this time I couldn't see anything particularly off with the output -

Code: Select all

root@DietPi:~# packages=$(dpkg --get-selections '*php*' | mawk '{print $1}')
root@DietPi:~# dpkg -r --force-depends $packages
(Reading database ... 28608 files and directories currently installed.)
Removing php-apcu (5.1.17+4.0.11-1) ...
Removing php-redis (4.2.0-1) ...
Removing php7.3-fpm (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-gd (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-intl (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-mbstring (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-mysql (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-xml (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-zip (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php-igbinary (3.0.0-1) ...
Removing php7.3-cli (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-json (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-opcache (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-readline (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php7.3-common (7.3.31-1+0~20210923.88+debian9~1.gbpac4058) ...
Removing php-common (2:84+0~20210621.36+debian9~1.gbp28513e) ...
Warning: Stopping phpsessionclean.service, but it can still be activated by:
  phpsessionclean.timer
root@DietPi:~# apt install $packages
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libncurses5
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  libicu63
Suggested packages:
  php-pear
Recommended packages:
  php-apcu-bc
The following NEW packages will be installed:
  libicu63 php-apcu php-common php-igbinary php-redis php7.3-cli php7.3-common
  php7.3-fpm php7.3-gd php7.3-intl php7.3-json php7.3-mbstring php7.3-mysql
  php7.3-opcache php7.3-readline php7.3-xml php7.3-zip
0 upgraded, 17 newly installed, 0 to remove and 0 not upgraded.
Need to get 12.0 MB of archives.
After this operation, 48.9 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get:1 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php-common all 2:69 [15.0 kB]
Get:2 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-common armhf 7.3.31-1~deb10u1 [527 kB]
Get:3 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-json armhf 7.3.31-1~deb10u1 [16.2 kB]
Get:4 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-opcache armhf 7.3.31-1~deb10u1 [155 kB]
Get:5 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-readline armhf 7.3.31-1~deb10u1 [10.7 kB]
Get:6 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-cli armhf 7.3.31-1~deb10u1 [1,127 kB]
Get:7 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-fpm armhf 7.3.31-1~deb10u1 [1,140 kB]
Get:8 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php-apcu armhf 5.1.17+4.0.11-1 [39.2 kB]
Get:9 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php-igbinary armhf 3.0.0-1 [58.0 kB]
Get:10 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf libicu63 armhf 63.1-6+deb10u1 [7,973 kB]
Get:11 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php-redis armhf 4.2.0-1 [104 kB]
Get:12 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-gd armhf 7.3.31-1~deb10u1 [22.6 kB]
Get:13 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-intl armhf 7.3.31-1~deb10u1 [104 kB]
Get:14 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-mbstring armhf 7.3.31-1~deb10u1 [472 kB]
Get:15 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-mysql armhf 7.3.31-1~deb10u1 [96.4 kB]
Get:16 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-xml armhf 7.3.31-1~deb10u1 [85.0 kB]
Get:17 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-zip armhf 7.3.31-1~deb10u1 [17.6 kB]
Fetched 12.0 MB in 4s (3,214 kB/s)
Selecting previously unselected package php-common.
(Reading database ... 28371 files and directories currently installed.)
Preparing to unpack .../0-php-common_2%3a69_all.deb ...
Unpacking php-common (2:69) ...
Selecting previously unselected package php7.3-common.
Preparing to unpack .../1-php7.3-common_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-common (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-json.
Preparing to unpack .../2-php7.3-json_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-json (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-opcache.
Preparing to unpack .../3-php7.3-opcache_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-opcache (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-readline.
Preparing to unpack .../4-php7.3-readline_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-readline (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-cli.
Preparing to unpack .../5-php7.3-cli_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-cli (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-fpm.
Preparing to unpack .../6-php7.3-fpm_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-fpm (7.3.31-1~deb10u1) ...
Setting up php-common (2:69) ...
Selecting previously unselected package php-apcu.
(Reading database ... 28498 files and directories currently installed.)
Preparing to unpack .../0-php-apcu_5.1.17+4.0.11-1_armhf.deb ...
Unpacking php-apcu (5.1.17+4.0.11-1) ...
Selecting previously unselected package php-igbinary.
Preparing to unpack .../1-php-igbinary_3.0.0-1_armhf.deb ...
Unpacking php-igbinary (3.0.0-1) ...
Selecting previously unselected package libicu63:armhf.
Preparing to unpack .../2-libicu63_63.1-6+deb10u1_armhf.deb ...
Unpacking libicu63:armhf (63.1-6+deb10u1) ...
Selecting previously unselected package php-redis.
Preparing to unpack .../3-php-redis_4.2.0-1_armhf.deb ...
Unpacking php-redis (4.2.0-1) ...
Selecting previously unselected package php7.3-gd.
Preparing to unpack .../4-php7.3-gd_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-gd (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-intl.
Preparing to unpack .../5-php7.3-intl_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-intl (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-mbstring.
Preparing to unpack .../6-php7.3-mbstring_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-mbstring (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-mysql.
Preparing to unpack .../7-php7.3-mysql_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-mysql (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-xml.
Preparing to unpack .../8-php7.3-xml_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-xml (7.3.31-1~deb10u1) ...
Selecting previously unselected package php7.3-zip.
Preparing to unpack .../9-php7.3-zip_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-zip (7.3.31-1~deb10u1) ...
Setting up libicu63:armhf (63.1-6+deb10u1) ...
Setting up php7.3-common (7.3.31-1~deb10u1) ...
Setting up php7.3-mysql (7.3.31-1~deb10u1) ...
Setting up php7.3-intl (7.3.31-1~deb10u1) ...
Setting up php7.3-xml (7.3.31-1~deb10u1) ...
Setting up php7.3-opcache (7.3.31-1~deb10u1) ...
Setting up php7.3-zip (7.3.31-1~deb10u1) ...
Setting up php7.3-gd (7.3.31-1~deb10u1) ...
Setting up php7.3-mbstring (7.3.31-1~deb10u1) ...
Setting up php7.3-json (7.3.31-1~deb10u1) ...
Setting up php7.3-readline (7.3.31-1~deb10u1) ...
Setting up php7.3-cli (7.3.31-1~deb10u1) ...
update-alternatives: using /usr/bin/php7.3 to provide /usr/bin/php (php) in auto mode
update-alternatives: using /usr/bin/phar7.3 to provide /usr/bin/phar (phar) in auto mode
update-alternatives: using /usr/bin/phar.phar7.3 to provide /usr/bin/phar.phar (phar.phar) in auto mode
Setting up php-igbinary (3.0.0-1) ...
Setting up php-redis (4.2.0-1) ...
Setting up php7.3-fpm (7.3.31-1~deb10u1) ...
Installing new version of config file /etc/apache2/conf-available/php7.3-fpm.conf ...
Installing new version of config file /etc/init.d/php7.3-fpm ...
Installing new version of config file /etc/logrotate.d/php7.3-fpm ...
Setting up php-apcu (5.1.17+4.0.11-1) ...
Processing triggers for systemd (241-7~deb10u8+rpi1) ...
Processing triggers for libc-bin (2.28-10+rpt2+rpi1) ...
root@DietPi:~#
Initially I got a 503 from the /nextcloud instance, but after rebooting I found myself back to the same PHP error as per my 8th Nov 3:39pm post.

Repeated the steps given by @Joulinar in the 7:49pm response and this appeared to go a little differently than before - again, looks pretty OK to me (no screaming error messages).

Code: Select all

root@DietPi:~# apt update
Get:1 http://raspbian.raspberrypi.org/raspbian buster InRelease [15.0 kB]
Hit:2 https://archive.raspberrypi.org/debian buster InRelease
Fetched 15.0 kB in 1s (14.6 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
root@DietPi:~# apt install php7.3-curl
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following package was automatically installed and is no longer required:
  libncurses5
Use 'apt autoremove' to remove it.
The following NEW packages will be installed:
  php7.3-curl
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 26.8 kB of archives.
After this operation, 114 kB of additional disk space will be used.
Get:1 http://raspbian.mirror.uk.sargasso.net/raspbian buster/main armhf php7.3-curl armhf 7.3.31-1~deb10u1 [26.8 kB]
Fetched 26.8 kB in 0s (82.4 kB/s)
Selecting previously unselected package php7.3-curl.
(Reading database ... 28623 files and directories currently installed.)
Preparing to unpack .../php7.3-curl_7.3.31-1~deb10u1_armhf.deb ...
Unpacking php7.3-curl (7.3.31-1~deb10u1) ...
Setting up php7.3-curl (7.3.31-1~deb10u1) ...

Creating config file /etc/php/7.3/mods-available/curl.ini with new version
Processing triggers for php7.3-fpm (7.3.31-1~deb10u1) ...
root@DietPi:~#
Refreshed the browser and...........it only $!%**£ works! :o :o

I bow down to you both for your patience and assistance over course of 3+ weeks.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: Updating DietPi has broken Nextcloud installation

Post by Joulinar »

ok great. Finally it seems to be solved. Hopefully
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
User avatar
MichaIng
Site Admin
Posts: 3514
Joined: Sat Nov 18, 2017 6:21 pm

Re: Updating DietPi has broken Nextcloud installation

Post by MichaIng »

Okay great. Looks like this is something we should add to our Stretch => Buster upgrade docs.
User avatar
Joulinar
Posts: 6441
Joined: Sat Nov 16, 2019 12:49 am

Re: Updating DietPi has broken Nextcloud installation

Post by Joulinar »

MichaIng wrote: Sun Nov 14, 2021 4:51 pm Okay great. Looks like this is something we should add to our Stretch => Buster upgrade docs.
Going to vote for this 8)
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply