An error occurred while installing the following package: (unknown package)

I don’t know if you would like me to create a new topic, but the problem for which I started this topic is back.

Today I read the notification about an update being available. I selected install. Briefly, a message appeared about the things that were being installed, after which the message appeared: An error occurred while installing the following package: (unknown package)

This time I do have command line access however. My logs can be found here.

@Lemmy2010 I moved your post to a new thread as I don’t think it was related.

From your logs there is no recent issues been seen but some issues when you tried to install wireguard which might be related to the errors you see when trying to upgrade via MyOSMC.

Suggest to connect via SSH and run
sudo apt-get update
sudo apt-get dist-upgrade
to see if an error is shown

After running the commands it mentions:

E: dpkg was interrupted, you must manually run ‘sudo dpkg --configure -a’ to correct the problem.

Running this command solved the problem. It did however not provide more details on the cause of the problem.

Unfortunately, after today’s update, the error is back. I could of course run another ‘sudo dpkg --configure -a’, but I think that would be more of a makeshift solution. Could you have another look at my log, and see if this could be fixed in a cleaner, more permanent way?

I would assume if you run sudo apt-get dist-upgrade from the console it may show you which package the problem is. Your issue started when you installed these packages, so guess some issues with the iptables-persistent installation. You could try to purge that.

Start-Date: 2021-10-21  18:15:09
Commandline: /usr/bin/apt-get-real -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 --yes --no-install-recommends install git dnsutils whiptail bsdmainutils iptables-persistent
Requested-By: osmc (1000)
Install: git-man:armhf (1:2.20.1-2+deb10u3, automatic), libirs161:armhf (1:9.11.5.P4+dfsg-5.1+deb10u5, automatic), bsdmainutils:armhf (11.1.2+b1), dnsutils:armhf (1:9.11.5.P4+dfsg-5.1+deb10u5), git:armhf (1:2.20.1-2+deb10u3), whiptail:armhf (0.52.20-8), libnewt0.52:armhf (0.52.20-8, automatic), netfilter-persistent:armhf (1.0.11+deb10u1, automatic), iptables-persistent:armhf (1.0.11+deb10u1), libcurl3-gnutls:armhf (7.64.0-4+deb10u2, automatic), libslang2:armhf (2.3.2-2, automatic), liberror-perl:armhf (0.17027-2, automatic)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2021-10-21  18:15:20

Start-Date: 2021-10-21  18:15:50
Commandline: /usr/bin/apt-get-real -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 --yes --no-install-recommends install iptables-persistent
Requested-By: osmc (1000)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2021-10-21  18:15:50

sudo apt-get dist-upgrade

only results in the message:

E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem.

No further hints are given.

Hi,

Have you tried running sudo dpkg --configure -a

@Lemmy2010, sorry please ignore, re-read topic now.

Thanks Tom.

P.S

@Lemmy2010,

I see from the logs, that when issues started to occur iptables-persistent (along with some other packages); was installed.

Please provide the output of:

sudo update-alternatives --config iptables

Press enter to retain the current value.

Regards

Sorry, I must have overlooked your response.

sudo update-alternatives --config iptables

Yields the following response:

There are 2 choices for the alternative iptables (providing /usr/sbin/iptables).

Selection Path Priority Status

  • 0 /usr/sbin/iptables-nft 20 auto mode
    1 /usr/sbin/iptables-legacy 10 manual mode
    2 /usr/sbin/iptables-nft 20 manual mode

Press to keep the current choice[*], or type selection number:

Hi,

Please select option1 for iptables-legacy.

Thanks Tom.

Unfortunately, the update problem remains after I selected option 1. Here you can find the log produced when I was trying to update.

You installed the unattended-upgrades package.

Unfortunately I can’t provide support for users with that package installed.

Any idea when that must have happened? I haven’t much else installed other than wireguard as far as I know.

Yes – you installed this yourself on 21st October. This was also when you experienced issues with APT.


Start-Date: 2021-10-21  19:36:14
Commandline: /usr/bin/apt-get-real -o APT::Status-Fd=4 -o APT::Keep-Fds::=5 -o APT::Keep-Fds::=6 --yes --no-install-recommends install unattended-upgrades
Requested-By: osmc (1000)
Error: Sub-process /usr/bin/dpkg returned an error code (1)
End-Date: 2021-10-21  19:36:14

Doesn’t ring a bell. Which package is this supposed to be about, and how do I uninstall it?

Sorry – I wasn’t clear.

If that package is present on your system, support won’t be provided, because it will install OSMC upgrades unattended but may not follow the recommendations that we make when shipping these updates to you.

I would recommend reinstalling your OS.

1 Like

So be it, thanks anyway for helping on Christmas eve.

1 Like