Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I have upgrade my ubuntu from 11.10 to 12.04. at last i can found that when i tries to install some packages it shows a error. after reading some blog i tried to fix that error by "sudo dpkg --configure -a". but when i run this command it show another error this

Setting up colord (0.1.16-2) ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /var/lib/colord -g colord -s /bin/false -u 115 colord' returned error code 1. Exiting.
dpkg: error processing colord (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up whoopsie (0.1.32) ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /nonexistent -g whoopsie -s /bin/false -u 115 whoopsie' returned error code 1. Exiting.
dpkg: error processing whoopsie (--configure):
 subprocess installed post-installation script returned error exit status 1
Setting up lightdm (1.2.1-0ubuntu1) ...
Adding system user `lightdm' (UID 115) ...
Adding new user `lightdm' (UID 115) with group `lightdm' ...
useradd: cannot lock /etc/passwd; try again later.
adduser: `/usr/sbin/useradd -d /var/lib/lightdm -g lightdm -s /bin/false -u 115 lightdm' returned error code 1. Exiting.
dpkg: error processing lightdm (--configure):
 subprocess installed post-installation script returned error exit status 1
dpkg: dependency problems prevent configuration of ubuntu-desktop:
 ubuntu-desktop depends on lightdm; however:
  Package lightdm is not configured yet.
dpkg: error processing ubuntu-desktop (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 colord
 whoopsie
 lightdm
 ubuntu-desktop

what can i do now ?

share|improve this question
    
Can you try this again: sudo /usr/sbin/useradd -d /var/lib/colord -g colord -s /bin/false -u 115 colord –  warl0ck May 10 '12 at 14:57
add comment

2 Answers

up vote 0 down vote accepted

Try this:

[ -f /etc/gshadow.lock ] && sudo rm /etc/gshadow.lock
[ -f /etc/shadow.lock ] && sudo rm /etc/shadow.lock
[ -f /etc/passwd.lock ] && sudo rm /etc/passwd.lock
[ -f /etc/group.lock ] && sudo rm /etc/group.lock
sudo dpkg --configure -a
share|improve this answer
add comment

This fixes it for me:

sudo delgroup scanner  
sudo apt-get install colord

That did it for me. Below were the diagnostic steps I took.

if you look at /var/lib/dpkg/info/colord.postinst - and add a set -x at the top and run it manually (/var/lib/dpkg/info/colord.postinst configure) - it will not get past adding the scanner, and if you get rid of --quiet, it says:

sudo addgroup --system scanner  
addgroup: The group `scanner' already exists and is not a system group. Exiting.
share|improve this answer
    
Ugh... the formatting here removed a critical CRLF... the fix is: sudo delgroup scanner; sudo apt-get install colord –  Michael Wolenetz Sep 23 '12 at 14:30
add comment

Your Answer

 
discard

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.