I can't install udev on plain ubuntu 14.04
Asked Answered
R

4

10

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...

Rooseveltroost answered 1/12, 2014 at 18:24 Comment(2)
Have you tried actually "sudo dpkg --configure -a" ?Strahan
Yes, no result. I've found solution for that anyway...Rooseveltroost
R
24

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

Rooseveltroost answered 10/12, 2014 at 23:4 Comment(2)
Can confirm it works. Seems like it has to do with the VPS host using an older linux kernel which does not support hotplug. So it will only be resolved when OVH updates their hosts.Wise
thanks, i've been having this problem for a month and now it's solved.Hanse
D
5

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

Delubrum answered 30/5, 2015 at 23:2 Comment(0)
E
0

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
Evacuee answered 31/3, 2017 at 21:5 Comment(0)
F
0

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

Fabaceous answered 30/5, 2019 at 11:37 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.