I tried fixing a broken autodl irssi installation on a rented dedicated server running Ubuntu 18.04.1 LTS (GNU/Linux 4.9.0-15-amd64 x86_64) and Swizzin Box by removing and reinstalling the box autodl package.
removing autodl gave :-
SUCCESS autodl removed
ERROR dpkg database is locked by apt-get. Please try again later
trying to reinstall it gave :-
INFO Installing autodl
E: Unable to correct problems, you have held broken packages.
ERROR The simulation check resulted in an error. Please consult the log.
the log shows
Reading package lists...
Building dependency tree...
Reading state information...
You might want to run 'apt --fix-broken install' to correct these.
The following packages have unmet dependencies:
pkg-config : Depends: libdpkg-perl but it is not installed
running 'apt --fix-broken install' gives :-
0 upgraded, 0 newly installed, 1 to remove and 107 not upgraded.
After this operation, 193 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 87206 files and directories currently installed.)
Removing pkg-config (0.29-4+b1) ...
Can't locate Dpkg/Arch.pm in @INC (you may need to install the Dpkg::Arch module) (@INC contains: /etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.26.1 /usr/local/share/perl/5.26.1 /usr/lib/x86_64-linux-gnu/perl5/5.26 /usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.26 /usr/share/perl/5.26 /usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base) at /usr/share/pkg-config-dpkghook line 14.
BEGIN failed--compilation aborted at /usr/share/pkg-config-dpkghook line 14.
dpkg: error processing package pkg-config (--remove):
subprocess installed pre-removal script returned error exit status 2
Errors were encountered while processing:
pkg-config
E: Sub-process /usr/bin/dpkg returned an error code (1)
Does anyone have any suggestions how I can resolve this issue?