because anydesk does not finish updating correctly? Topic is solved

Having issues with your DietPi installation or found a bug? Post it here.
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

because anydesk does not finish updating correctly?

Post by valdragas »

Hello

I have installed anydesk and the program works correctly but during the installation it gives an error.

Every time I run apt-get update I get the following error:

Setting up anydesk (6.1.1) ...
dpkg: error processing package anydesk (--configure):
installed anydesk package post-installation script subprocess returned error exit status 1

Any idea what the problem may be?
User avatar
MichaIng
Site Admin
Posts: 3023
Joined: Sat Nov 18, 2017 6:21 pm

Re: because anydesk does not finish updating correctly?

Post by MichaIng »

It means that the script /var/lib/dpkg/info/anydesk.postinst failed.

You can check it's content and try to run it manually to see where it fails:

Code: Select all

cat /var/lib/dpkg/info/anydesk.postinst
/var/lib/dpkg/info/anydesk.postinst
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: because anydesk does not finish updating correctly?

Post by valdragas »

This is the content of the file, any suggestions?

Code: Select all

#!/bin/bash

set -e

command_exists()
{
        command -v "$1" > /dev/null 2>&1
}

if [ "$1" = configure ]; then

        INITSYS=$(ls -al /proc/1/exe | awk -F' ' '{print $NF}' | awk -F'/' '{print $NF}')

        if [ "systemd" == "$INITSYS" ]; then
                if [ -e /etc/systemd/system/anydesk.service ]; then
                        rm /etc/systemd/system/anydesk.service
                fi
                cp /usr/share/anydesk/files/systemd/anydesk.service /etc/systemd/system/anydesk.service
                systemctl daemon-reload
                deb-systemd-invoke enable anydesk
                deb-systemd-invoke start anydesk
        elif [ "init" == "$INITSYS" ]; then
                if [ -e /etc/init.d/anydesk ]; then
                        rm /etc/init.d/anydesk
                fi
                chmod +x /usr/share/anydesk/files/init/anydesk
                ln -s /usr/share/anydesk/files/init/anydesk /etc/init.d/anydesk
                update-rc.d anydesk defaults
                invoke-rc.d anydesk start
        fi

        command_exists update-menus && update-menus
        command_exists update-desktop-database && update-desktop-database
        command_exists xdg-desktop-menu && xdg-desktop-menu forceupdate
fi
User avatar
Joulinar
Posts: 4823
Joined: Sat Nov 16, 2019 12:49 am

Re: because anydesk does not finish updating correctly?

Post by Joulinar »

I guess the idea was to run it manually to see where it fails

Code: Select all

/var/lib/dpkg/info/anydesk.postinst
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: 3023
Joined: Sat Nov 18, 2017 6:21 pm

Re: because anydesk does not finish updating correctly?

Post by MichaIng »

Both, now that we know the script we can interpret its output better.
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: because anydesk does not finish updating correctly?

Post by valdragas »

Hi

I have manually executed the commands that appear in the script and it accepts them but the error persists
User avatar
MichaIng
Site Admin
Posts: 3023
Joined: Sat Nov 18, 2017 6:21 pm

Re: because anydesk does not finish updating correctly?

Post by MichaIng »

When you execute the script as a whole, does it not throw any helpful error message?
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: because anydesk does not finish updating correctly?

Post by valdragas »

No, not error

Code: Select all

root@DietPi:~# /var/lib/dpkg/info/anydesk.postinst
root@DietPi:~# 
User avatar
MichaIng
Site Admin
Posts: 3023
Joined: Sat Nov 18, 2017 6:21 pm

Re: because anydesk does not finish updating correctly?

Post by MichaIng »

Ah sorry, it requires an argument:

Code: Select all

/var/lib/dpkg/info/anydesk.postinst configure
valdragas
Posts: 35
Joined: Sat Oct 03, 2020 1:14 pm

Re: because anydesk does not finish updating correctly?

Post by valdragas »

Nothing, not error

Code: Select all


root@DietPi:~# /var/lib/dpkg/info/anydesk.postinst configure
Synchronizing state of anydesk.service with SysV service script with /lib/systemd/systemd-sysv-install.
Executing: /lib/systemd/systemd-sysv-install enable anydesk
root@DietPi:~#
Post Reply