After upgrading to Ubuntu 15.04 I got a weird error with udev.

-> sudo apt-get dist-upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following NEW packages will be installed:
  init
0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
228 not fully installed or removed.
Need to get 0 B/3,734 B of archives.
After this operation, 30.7 kB of additional disk space will be used.
Do you want to continue? [Y/n] 
Setting up udev (219-7ubuntu3) ...
dpkg: error processing package udev (--configure):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 udev
E: Sub-process /usr/bin/dpkg returned an error code (1)

After about an hour of searching I came to the knowledge that you could fix it by changing the /etc/init.d/udev file. but the problem is that this system got replaced in Ubuntu 15.04 by the systemd system. So I was back at square 1.

So my question is, how can I fix this?

Thanks in advance.

Edit: I reinstalled my Ubuntu a day before the answer so sadly enough I can not say if it worked or not :(. But I still have to upgrade my laptop to Ubuntu 15.04 so if I run in the same problem I will definitely test the solution from below.

Edit 2: So I finaly got around to upgrade my laptop to Ubuntu 15.04 and I runned into the same problem so I gave the first fix from @Shengolol a try. And I can tell you that it did work :D.

So thanks a lot Shengolol :).

share|improve this question
    
Please mark an answer as accepted if it solved your problem, this will also give you a few rep points. (The answer works for me.) – LiveWireBT Apr 28 '15 at 5:02
up vote 7 down vote accepted

Yesterday I stumbled into the same problem. I upgraded from 14.10 to 15.04 and during the upgrade I got the same errors as you get. Luckily I was able to pinpoint the cause of the issue. There are two ways to fix this:

First way (EASY) Go to the terminal and execute the command sudo groupdel input. Now run sudo apt-get update && sudo apt-get dist-upgrade.

Only read the second way if you are interested in the cause of the issue or if the first way didn't work.

Second way (I just posted this to explain the issue)

A certain line in the dpkg configuration script is the problem, we want to delete this line. First open the file via terminal:

sudo nano /var/lib/dpkg/info/udev.postinst

Now search for the line addgroup --quiet --system input and delete it. This line is the first part of the config script. It adds the group 'input' to your system. Strangely it crashes the whole script when the group already exists. Obviously members of this group have access to your systems input, but it isn't needed, as input also works without this group. Save your edited file and run sudo apt-get update && sudo apt-get dist-upgrade.

I hope this fixed the issue for you and will be helpful for other users in the future. Until this is fixed we have to apply one of the fixes everytime there is an update for udev. I have no idea how to report this bug, otherwise I would have done it.

Best Regards,

Shengolol

share|improve this answer

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.