I can't install udev on plain ubuntu 14.04

7k views Asked by At

I've plain Ubuntu 14.04 Server (64-bit) installation.

When use:

sudo apt-get update

Print this error:

....
Hit http://security.ubuntu.com trusty-security/universe Translation-en
E: dpkg was interrupted, you must manually run 'sudo dpkg --configure -a' to correct the problem. 

After removing tmp.i /var/lib/dpkg/updates# sudo rm tmp.i apt-get update went OK but...

When I tried 'sudo apt-get upgrade':

Fetched 534 kB in 4s (112 kB/s)              
Reading package lists... Done
root@vps****:/# sudo apt-get upgrade
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
Setting up udev (204-5ubuntu20.9) ...
 * udev requires hotplug support, not started
   ...fail!
invoke-rc.d: initscript udev, action "restart" failed.
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)

I can't find any solution for that so far on web, tried many ways but nothing worked...

4

There are 4 answers

2
kaczorro On

The reason may be that problem occurs on all Ubuntu 14.04 installations on OVH servers. I've contacted technical support they don't have any answer that may help apart from 'help yourself'.

After getting this error:

nano /etc/init.d/udev

After the ### END INIT INFO add:

exit 0         

Save and exit.

dpkg --configure -a         
apt-get upgrade         

Edit the file again, and remove the exit 0, save & exit then installing subsequent packages work correctly and the system seems fine after reboots, without that awful error message ever appearing.

Temporary solution from this thread: http://forum.ovh.co.uk/showthread.php?8480-udev-requires-hotplug-support-not-started/page2&s=2144010031f992268c5690726da09284

0
Raydude On

For those who get here after me, I had to edit /usr/sbin/invoke-rc.d to add an exit 0 after the first comments to get udev to configure.

nano -w /usr/sbin/invoke-rc.d

...
# You should have received a copy of the GNU General Public License along
# with this program; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
exit 0

Then run:

dpkg --configure -a

Then remove the exit 0 from invoke-rc.d

0
ryanpcmcquen On

Instead of editing /etc/init.d/udev twice, you could just add this on a newline after ### END INIT INFO:

dpkg --configure -a || exit 0

That way if the dpkg --configure fails it will exit, otherwise it will continue on as normal.

Or, if editing files isn't your thing, this will do the trick:

[ ! "$(grep -A1 '### END INIT INFO' /etc/init.d/udev | grep 'dpkg --configure -a || exit 0')" ] \
&& sudo sed -i 's/### END INIT INFO/### END INIT INFO\
dpkg --configure -a || exit 0/' /etc/init.d/udev
0
Alba Mendez On

For people who are getting this on OVH servers, the above hacks are no longer needed!

This answer by proxy should work:

$ apt-get download udev
$ sudo dpkg -i --force-confmiss udev_*_amd64.deb
$ sudo apt-get upgrade

Worked for me. For more info go to Dimitri's comment in Ubuntu's bug tracker.

It seems this is because OVH doesn't put /etc/init/udev.conf in your system. 10/10