0

I tried installing webmin through the apt-get method. Then I tried reinstalling it because I messed up the config without backing it up. So I removed it and then tried to install it. My full log:

root@278420-1484:~# apt-get install webmin
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following NEW packages will be installed:
  webmin
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B/15.2 MB of archives.
After this operation, 161 MB of additional disk space will be used.
(Reading database ... 37754 files and directories currently installed.)
Preparing to unpack .../archives/webmin_1.820_all.deb ...
Port 10000 is already in use
dpkg: error processing archive /var/cache/apt/archives/webmin_1.820_all.deb (--unpack):
subprocess new pre-installation script returned error exit status 2
Errors were encountered while processing:
 /var/cache/apt/archives/webmin_1.820_all.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@278420-1484:~#

I already tried apt-get clean, apt-get update and other methods I found on the internet but nothing got it to work. Please help me.

Tony Lancer
  • 1,003
Guchen
  • 1
  • For future reference, I built webmin from source (doesn't require much, just perl and a few other things), and found it a lot easier than trying to install through apt-get. –  Nov 30 '16 at 18:24
  • If I do that I get the error: root@278420-1484:~# dpkg --install webmin_1.660_all.deb (Reading database ... 37754 files and directories currently installed.) Preparing to unpack webmin_1.660_all.deb ... Port 10000 is already in use dpkg: error processing archive webmin_1.660_all.deb (--install): subprocess new pre-installation script returned error exit status 2 Errors were encountered while processing: webmin_1.660_all.deb – Guchen Nov 30 '16 at 19:34
  • Could you please [edit] your post, when you want to add information? Especially file or program output listings (with the help of the {} button in the editor toolbar) will be much more readable there; alternatively you can use a pastie service for longer listings and include the link of your pastie in your question. Overall it’s best to have everything relevant in one place. Additionally, comments may be deleted for various reasons. Thanks. – David Foerster Nov 30 '16 at 21:08
  • @Guchen Compiling from source has nothing to do with dpkg. –  Nov 30 '16 at 21:43
  • @Guchen but it doesn't matter, apt-get and dpkg are not the problems here. –  Nov 30 '16 at 21:43

2 Answers2

1

Some process is listening on TCP port 10000 on your system, which means that other programs like Webmin can't listen on the same port at the same time. Unfortunately Webmin's installer script breaks if it can't listen on that port (imho the installer should succeed even if the installed service fails to run). The best solution is to find out what's listening on port 10000 and take it from there.

David Foerster
  • 36,264
  • 56
  • 94
  • 147
-1

I had a similar problem last night while installing KDE desktop environment .... try

sudo apt-get -f install

reference:- Apt-get not working after attempting to install kde desktop