Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trying to update #3739

Closed
snoodler opened this issue Aug 26, 2020 · 20 comments
Closed

Trying to update #3739

snoodler opened this issue Aug 26, 2020 · 20 comments
Labels
Solution available 🥂 Definite solution has been done

Comments

@snoodler
Copy link

Details:

  • Date | Wed 26 Aug 12:17:53 BST 2020
  • Bug report | 6fdb9c44-6939-4839-9232-1aa88405a615
  • DietPi version | v6.28.0 (MichaIng/master)
  • Image creator | DietPi Core Team
  • Pre-image | Raspbian Lite
  • SBC device | RPi 4 Model B (armv7l) (ID=4)
  • Kernel version | Linux DietPi 4.19.93-v7l+ DietPi-Software | Plexmediaserver: installed but launches only as Plex Web #1290 SMP Fri Jan 10 16:45:11 GMT 2020 armv7l GNU/Linux
  • Distro | buster (ID=5)
  • Command | G_AGUG
  • Exit code | 100
  • Software title | DietPi-Update

Steps to reproduce:

  1. ... i just tried to update with dietpi-update
  2. ...

Expected behaviour:

  • ...

Actual behaviour:

  • ...it gives me an error

Additional logs:

Setting up libapache2-mod-php7.3 (7.3.19-1~deb10u1) ...
dpkg: error processing package libapache2-mod-php7.3 (--configure):
 installed libapache2-mod-php7.3 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 libapache2-mod-php7.3
E: Sub-process /usr/bin/dpkg returned an error code (1)

[FAILED] DietPi-Update | Unable to continue, DietPi-Update will now terminate.

@MichaIng
Copy link
Owner

Many thanks for your report. Please run the following and post the full output here:

apt install libapache2-mod-php7.3

@snoodler
Copy link
Author

snoodler commented Aug 26, 2020

root@DietPi:~# apt install libapache2-mod-php7.3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libapache2-mod-php7.3 is already the newest version (7.3.19-1~deb10u1).
The following package was automatically installed and is no longer required:
  libmicrodns0
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 0 to remove and 18 not upgraded.
1 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 libapache2-mod-php7.3 (7.3.19-1~deb10u1) ...
dpkg: error processing package libapache2-mod-php7.3 (--configure):
 installed libapache2-mod-php7.3 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 libapache2-mod-php7.3
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@DietPi:~# 

@MichaIng
Copy link
Owner

Could you please do and paste the following:

cat /var/lib/dpkg/info/libapache2-mod-php7.3.postinst
dash -x /var/lib/dpkg/info/libapache2-mod-php7.3.postinst configure '7.3.19-1~deb10u1'

@snoodler
Copy link
Author

snoodler commented Aug 26, 2020

cat /var/lib/dpkg/info/libapache2-mod-php7.3.postinst

Large log file attached. Click to expand!
root@DietPi:~# cat /var/lib/dpkg/info/libapache2-mod-php7.3.postinst
#!/bin/sh

set -e

if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
    . /usr/share/apache2/apache2-maintscript-helper

    php_enable() {
	local a2query_ret=0
	a2query -m "php7.3" > /dev/null 2>&1 || a2query_ret=$?
	if [ "$a2query_ret" -eq 0 ] ; then
	    apache2_msg "info" "$DPKG_MAINTSCRIPT_PACKAGE: not switching MPM - already enabled"
	    return 1
	elif [ "$a2query_ret" -eq 32	 ] ; then
	    apache2_msg "info" "$DPKG_MAINTSCRIPT_PACKAGE: not switching MPM - disabled by maintainer"
	    return 1
	fi

	PHP_MODULE=$(a2query -m | sed -n 's/^\(php[\.0-9]*\) (enabled.*)/\1/p')
        if [ -n "$PHP_MODULE" -a "$PHP_MODULE" != "php7.3" ]; then
	    apache2_msg "err" "$DPKG_MAINTSCRIPT_PACKAGE: $PHP_MODULE module already enabled, not enabling PHP 7.3"
	    return 1
	fi

	mpm=$(a2query -M)
	case "$(a2query -M)" in
	    prefork|itk) return 0;;
	    *) if apache2_switch_mpm prefork; then return 0; fi;;
	esac
        apache2_msg "err" "$DPKG_MAINTSCRIPT_PACKAGE: Could not switch to prefork MPM, not enabling PHP 7.3"
	return 1
    }

else
    echo "Warning: Could not load Apache 2.4 maintainer script helper."

    php_enable() {
        return 1;
    }

fi

# we've registered a trigger to handle extension updates.
if [ "$1" = "triggered" ] && [ "$2" = "/etc/php/7.3/apache2/conf.d" ]; then
    if [ -e /usr/share/apache2/apache2-maintscript-helper ]; then
	. /usr/share/apache2/apache2-maintscript-helper
	apache2_reload restart
    fi
    exit 0
elif [ "$1" != "configure" ]; then
    exit 0
fi

CONFDIR=/etc/php/7.3/apache2/conf.d

if [ "$1" = "configure" ]; then
    phpini="/etc/php/7.3/apache2/php.ini"

    if [ "apache2" = "cli" ]; then
	ucf /usr/lib/php/7.3/php.ini-production.apache2 $phpini
    else
	ucf /usr/lib/php/7.3/php.ini-production $phpini
    fi
    ucfr libapache2-mod-php7.3 $phpini

    if [ -e /usr/lib/php/php-maintscript-helper ]; then
	. /usr/lib/php/php-maintscript-helper
	
	mods=$(phpquery -M -v 7.3)
	for mod in $mods; do
	    php_invoke enmod 7.3 apache2 $mod
	done
    fi

    if [ -n "$2" ] && dpkg --compare-versions "$2" lt "7.0.3-2~"; then
	rm -f /etc/php/7.3/apache2/conf.d/20-opcache.ini;
    fi	    
fi

# Automatically added by dh_apache2/UNDECLARED
if php_enable; then
	if [ -e /usr/share/apache2/apache2-maintscript-helper ] ; then
		. /usr/share/apache2/apache2-maintscript-helper
		for conf in php7.3  ; do
			apache2_invoke enmod $conf  || exit 1
		done
	fi
fi
# End automatically added section


exit 0


+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m opcache
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q opcache
+ php_msg debug php_invoke opcache: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke opcache: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke opcache: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 sockets
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=sockets
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m sockets
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q sockets
+ php_msg debug php_invoke sockets: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke sockets: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke sockets: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 fileinfo
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=fileinfo
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m fileinfo
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q fileinfo
+ php_msg debug php_invoke fileinfo: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke fileinfo: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke fileinfo: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 smbclient
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=smbclient
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m smbclient
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q smbclient
+ php_msg debug php_invoke smbclient: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke smbclient: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke smbclient: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 dom
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=dom
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m dom
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q dom
+ php_msg debug php_invoke dom: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke dom: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke dom: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 readline
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=readline
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m readline
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q readline
+ php_msg debug php_invoke readline: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke readline: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke readline: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 gettext
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=gettext
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m gettext
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q gettext
+ php_msg debug php_invoke gettext: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke gettext: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke gettext: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 wddx
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=wddx
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m wddx
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q wddx
+ php_msg debug php_invoke wddx: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke wddx: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke wddx: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 ctype
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=ctype
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m ctype
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q ctype
+ php_msg debug php_invoke ctype: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke ctype: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke ctype: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 xmlwriter
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=xmlwriter
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m xmlwriter
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q xmlwriter
+ php_msg debug php_invoke xmlwriter: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke xmlwriter: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke xmlwriter: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 calendar
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=calendar
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m calendar
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q calendar
+ php_msg debug php_invoke calendar: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke calendar: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke calendar: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 xml
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=xml
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m xml
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q xml
+ php_msg debug php_invoke xml: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke xml: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke xml: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 mysqli
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=mysqli
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m mysqli
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q mysqli
+ php_msg debug php_invoke mysqli: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke mysqli: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke mysqli: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 mysqlnd
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=mysqlnd
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m mysqlnd
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q mysqlnd
+ php_msg debug php_invoke mysqlnd: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke mysqlnd: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke mysqlnd: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 redis
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=redis
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m redis
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q redis
+ php_msg debug php_invoke redis: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke redis: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke redis: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ php_invoke enmod 7.3 apache2 phar
+ local CMD=enmod
+ local VERSION=7.3
+ local SAPI=apache2
+ local MOD=phar
+ local check_switch=
+ local invoke_string=
+ local rcd_action=
+ local rcd_scripts=
+ local sapi_list=
+ [ -x /usr/sbin/phpenmod ]
+ [ -x /usr/sbin/phpquery ]
+ version_list=7.3
+ sapi_list=apache2
+ local phpquery_ret=0
+ phpquery -v 7.3 -s apache2 -m phar
+ [ 0 -eq 0 ]
+ phpenmod -m -v 7.3 -s apache2 -q phar
+ php_msg debug php_invoke phar: already enabled for PHP 7.3 apache2 sapi
+ local PRIORITY=debug
+ local MSG=php_invoke phar: already enabled for PHP 7.3 apache2 sapi
+ [ -z  ]
+ [ -n  ]
+ [ debug != debug ]
+ [ -x /usr/bin/logger ]
+ local LOGGER=/usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 
+ /usr/bin/logger -p daemon.debug -t libapache2-mod-php7.3 php_invoke phar: already enabled for PHP 7.3 apache2 sapi
+ PHP_NEED_ACTION=1
+ [ -n 1 -a -n  ]
+ [ -n 7.3.19-1~deb10u1 ]
+ dpkg --compare-versions 7.3.19-1~deb10u1 lt 7.0.3-2~
+ php_enable
+ local a2query_ret=0
+ a2query -m php7.3
+ a2query_ret=1
+ [ 1 -eq 0 ]
+ [ 1 -eq 32 ]
+ a2query -m
+ sed -n s/^\(php[\.0-9]*\) (enabled.*)/\1/p
+ PHP_MODULE=
+ [ -n  -a  != php7.3 ]
+ a2query -M
+ mpm=prefork
+ a2query -M
+ return 0
+ [ -e /usr/share/apache2/apache2-maintscript-helper ]
+ . /usr/share/apache2/apache2-maintscript-helper
+ [ -n 1 ]
+ return
+ apache2_invoke enmod php7.3
+ local CMD=enmod
+ local CONF=php7.3
+ local RCD_ACTION=
+ local invoke_rcd=0
+ local check_switch=
+ local invoke_string=
+ [ -x /usr/sbin/a2enmod ]
+ [ -x /usr/sbin/a2query ]
+ [ -n  ]
+ check_switch=-m
+ invoke_string=module
+ rcd_action=restart
+ local a2query_ret=0
+ a2query -m php7.3
+ a2query_ret=1
+ [ 1 -eq 0 ]
+ [ 1 -eq 32 ]
+ APACHE2_NEED_ACTION=1
+ a2enmod -m -q php7.3
+ return 1
+ exit 1
root@DietPi:~# 

@MichaIng
Copy link
Owner

MichaIng commented Aug 26, 2020

The postinst script fails to enable the PHP module for Apache. Can you please try this manually:

a2enmod php7.3

And check if the files are there:

ls -l /etc/apache2/mods-available/php7.3*
ls -l /etc/apache2/mods-enabled/php7.3*

@snoodler
Copy link
Author

snoodler commented Aug 26, 2020

root@DietPi:~# a2enmod php7.3
ERROR: Module php7.3 does not exist!
root@DietPi:~# ls -l /etc/apache2/mods-available/php7.3*
ls: cannot access '/etc/apache2/mods-available/php7.3*': No such file or directory
root@DietPi:~# ls -l /etc/apache2/mods-enabled/php7.3*
ls: cannot access '/etc/apache2/mods-enabled/php7.3*': No such file or directory
root@DietPi:~# 

@MichaIng
Copy link
Owner

Ehm, okay the files are missing, that is a good reason. But those are part of the package 🤔:

dpkg -L libapache2-mod-php7.3

Please try to reinstall:

apt install --reinstall libapache2-mod-php7.3

@snoodler
Copy link
Author

snoodler commented Aug 26, 2020

root@DietPi:~# dpkg -L libapache2-mod-php7.3
/.
/etc
/etc/apache2
/etc/apache2/mods-available
/etc/apache2/mods-available/php7.3.conf
/etc/apache2/mods-available/php7.3.load
/etc/php
/etc/php/7.3
/etc/php/7.3/apache2
/etc/php/7.3/apache2/conf.d
/usr
/usr/lib
/usr/lib/apache2
/usr/lib/apache2/modules
/usr/lib/apache2/modules/libphp7.3.so
/usr/lib/php
/usr/lib/php/7.3
/usr/lib/php/7.3/sapi
/usr/lib/php/7.3/sapi/apache2
/usr/share
/usr/share/bug
/usr/share/bug/libapache2-mod-php7.3
/usr/share/bug/libapache2-mod-php7.3/control
/usr/share/bug/libapache2-mod-php7.3/script
/usr/share/doc
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/libapache2-mod-php7.3
/usr/share/doc/libapache2-mod-php7.3
root@DietPi:~# apt install --reinstall libapache2-mod-php7.3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following package was automatically installed and is no longer required:
  libmicrodns0
Use 'apt autoremove' to remove it.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 18 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for libapache2-mod-php7.3:armhf
root@DietPi:~# 

@MichaIng
Copy link
Owner

MichaIng commented Aug 26, 2020

Very strange one, the meta files must have been corrupted somehow. Found one match: https://askubuntu.com/questions/266450

Lets try to cleanup from ground:

/boot/dietpi/func/dietpi-set_software apt-cache clean
apt update
apt -f install
(( $? )) && apt install --reinstall libapache2-mod-php7.3
(( $? )) && dpkg -i /var/cache/apt/archives/libapache2-mod-php7.3*.deb
apt upgrade
(( $? )) && apt install --reinstall libapache2-mod-php7.3
dpkg --configure -a
  • Some steps are doubled and others only done if the prior step failed, based on what the guys on askubuntu.com tried. Let's see if it helps.

@snoodler
Copy link
Author

snoodler commented Aug 27, 2020

root@DietPi:~# apt -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libllvm8 libmicrodns0
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libapache2-mod-php7.3 (7.3.19-1~deb10u1) ...
dpkg: error processing package libapache2-mod-php7.3 (--configure):
 installed libapache2-mod-php7.3 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 libapache2-mod-php7.3
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@DietPi:~# apt -f install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libllvm8 libmicrodns0
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up libapache2-mod-php7.3 (7.3.19-1~deb10u1) ...
dpkg: error processing package libapache2-mod-php7.3 (--configure):
 installed libapache2-mod-php7.3 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 libapache2-mod-php7.3
E: Sub-process /usr/bin/dpkg returned an error code (1)

@MichaIng
Copy link
Owner

Yes, I expected that, please go on with the next commands, they include other install approaches.

@snoodler
Copy link
Author

snoodler commented Aug 27, 2020

I tried all of the ones in that page, still the same results... cant I just uninstall and install apache again? I dont undertsand what the problem is.

root@DietPi:~# sudo dpkg --configure -a
Setting up libapache2-mod-php7.3 (7.3.19-1~deb10u1) ...
dpkg: error processing package libapache2-mod-php7.3 (--configure):
 installed libapache2-mod-php7.3 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 libapache2-mod-php7.3

@MichaIng
Copy link
Owner

Can you please try again:

dpkg -i /var/cache/apt/archives/libapache2-mod-php7.3*.deb

I added it with (( $? )) && which made it only execute if the previous command failed, so those were meant to be executed directly behind each other via copy&paste the whole block.

However if that fails, lets verify the existence and consistency of all required files:

ls -l /var/cache/apt/archives/libapache2-mod-php7.3*.deb
ls -l /var/lib/dpkg/info/libapache2-mod-php7.3*
dpkg-deb -x /var/cache/apt/archives/libapache2-mod-php7.3*.deb /tmp/libapache2-mod-php7.3
ls -al /tmp/libapache2-mod-php7.3/etc/apache2/mods-available

And now I have an idea:

  • /etc/apache2/mods-available/php7.3.conf is a config file: cat /var/lib/dpkg/info/libapache2-mod-php7.3*.conffiles
  • If a config file is manually removed, dpkg with --force-defconf/--force-oldconf option (preserve changed config files automatically) will not recover it.
  • If this is the reason, the following should work: dpkg --force-confmiss --configure -a

@snoodler
Copy link
Author

snoodler commented Aug 27, 2020

root@DietPi:~# ls -l /var/cache/apt/archives/libapache2-mod-php7.3*.deb
ls: cannot access '/var/cache/apt/archives/libapache2-mod-php7.3*.deb': No such file or directory
root@DietPi:~# ls -l /var/lib/dpkg/info/libapache2-mod-php7.3*
-rw-r--r-- 1 root root   80 Jul  5 07:46 /var/lib/dpkg/info/libapache2-mod-php7.3.conffiles
-rw-r--r-- 1 root root  679 Aug 26 12:06 /var/lib/dpkg/info/libapache2-mod-php7.3.list
-rw-r--r-- 1 root root  373 Jul  5 07:46 /var/lib/dpkg/info/libapache2-mod-php7.3.md5sums
-rwxr-xr-x 1 root root 2476 Jul  5 07:46 /var/lib/dpkg/info/libapache2-mod-php7.3.postinst
-rwxr-xr-x 1 root root 1051 Jul  5 07:46 /var/lib/dpkg/info/libapache2-mod-php7.3.postrm
-rwxr-xr-x 1 root root  828 Jul  5 07:46 /var/lib/dpkg/info/libapache2-mod-php7.3.prerm
-rw-r--r-- 1 root root   45 Jul  5 07:46 /var/lib/dpkg/info/libapache2-mod-php7.3.triggers
root@DietPi:~# dpkg-deb -x /var/cache/apt/archives/libapache2-mod-php7.3*.deb /tmp/libapache2-mod-php7.3
dpkg-deb: error: failed to read archive '/var/cache/apt/archives/libapache2-mod-php7.3*.deb': No such file or directory
root@DietPi:~# ls -al /tmp/libapache2-mod-php7.3/etc/apache2/mods-available
ls: cannot access '/tmp/libapache2-mod-php7.3/etc/apache2/mods-available': No such file or directory
root@DietPi:~# 

@MichaIng
Copy link
Owner

MichaIng commented Aug 27, 2020

Ah the archive has been clean. Please run apt install --reinstall libapache2-mod-php7.3 first (which downloads the archive) and then the steps again.

But first try dpkg --force-confmiss --configure -a which might fix it already if my idea applies, although, probably --force-confmiss needs to be given with the install command already, not sure.

@snoodler
Copy link
Author

snoodler commented Aug 27, 2020

root@DietPi:~# dpkg --force-confmiss --configure -a
Setting up libapache2-mod-php7.3 (7.3.19-1~deb10u1) ...
dpkg: error processing package libapache2-mod-php7.3 (--configure):
 installed libapache2-mod-php7.3 package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 libapache2-mod-php7.3
root@DietPi:~# 

@snoodler
Copy link
Author

snoodler commented Aug 27, 2020

root@DietPi:~# apt install --reinstall libapache2-mod-php7.3
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages were automatically installed and are no longer required:
  libllvm8 libmicrodns0
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
E: Internal Error, No file name for libapache2-mod-php7.3:armhf
root@DietPi:~# 

@MichaIng
Copy link
Owner

Okay, lets try it manually:

cd /tmp
wget http://raspbian.raspberrypi.org/raspbian/pool/main/p/php7.3/libapache2-mod-php7.3_7.3.19-1~deb10u1_armhf.deb
dpkg --force-confmiss -i libapache2-mod-php7.3_7.3.19-1~deb10u1_armhf.deb

@snoodler
Copy link
Author

that worked, thank you dietpi-update was successful

@MichaIng
Copy link
Owner

Finally, good to know and keep that option in mind. Of course such basically required config files should not be removed in the first place, but sometimes things happen accidentally.

@Joulinar Joulinar added the Solution available 🥂 Definite solution has been done label Aug 27, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Solution available 🥂 Definite solution has been done
Projects
None yet
Development

No branches or pull requests

3 participants