Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Hi I am installing mon in Debian?linux using command apt-get install mon

But It's showing the error and aborting the installation. error is like :

apt-get install mon

Reading package lists... Done

Building dependency tree

Reading state information... Done

The following NEW packages will be installed:

mon 0 upgraded, 1 newly installed, 0 to remove and 109 not upgraded.

Need to get 0B/179kB of archives.

After this operation, 741kB of additional disk space will be used.

(Reading database ... 106004 files and directories currently installed.)

Unpacking mon (from .../mon_0.99.2-13_i386.deb) ...

Looking for user name availability (mon)... already taken.

Installation aborted!

dpkg: error processing /var/cache/apt/archives/mon_0.99.2-13_i386.deb (--unpack):

subprocess pre-installation script returned error exit status 1

Errors were encountered while processing:


E: Sub-process /usr/bin/dpkg returned an error code (1)

share|improve this question
You're only showing the aftermath of the error. Edit your question to include the whole output from the apt-get install command. – Gilles Aug 1 '10 at 9:24

Looking for user name availability (mon)... already taken.

The mon program runs as a dedicated system user also called mon. The installer tried to create this system user, but there is already a user with this name on your system.

If you can remove or rename the existing mon user (and group if you also have one), this will let you install the mon package. Otherwise you'll have to pick a different name to run the mon program under, which requires modifying and recompiling the source package.

EDIT: Here's how to rename the existing mon user to newname (pick a better name), at least the easy part. I assume this is a local user, not a NIS or LDAP user (otherwise the resolution would be very different). It's ok if some of the mv commands are for files that don't exist, just skip them.

usermod -l newname mon
groupmod -n newname mon
mv /var/spool/cron/crontabs/mon /var/spool/cron/crontabs/newname
mv /var/spool/main/mon /var/spool/main/newname

The hard part is finding any reference you have on your system to the old mon user name. There's no hard-and-fast rule for this, it depends a lot on what that user's been doing.

share|improve this answer
Thanks for the reply. I have no idea how to rename existing mon user.Please explain in detail how to do that. – sjain Aug 2 '10 at 3:45
Thanks a lot. It worked. Can you give me the urls to know more about mon because I have to write the startup script for mon(/etc/init.d/mon) – sjain Aug 3 '10 at 4:12
@sjain: there is already a startup script for mon in the Debian package. In what way does it not suit you? – Gilles Aug 3 '10 at 7:16
Actually I had to prepare a document so that others can install this in the fresh machine.I had the machine with already installed mon.So to check the steps I deleted the mon dorectories and the startup scripts too.That's why it is not in my machine. If it comes with debian package then no problem I will get it from the other machine. Thanks a lot for your replies. – sjain Aug 3 '10 at 8:27

Sounds like that mon deb package was not transferred completely or it was otherwise corrupted.

What if you perform

rm -f /var/cache/apt/archives/mon_0.99.2-13_i386.deb

and then retry the installation?

share|improve this answer
I tried this but didnot worked. – sjain Aug 1 '10 at 8:57

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.