我无法在纯Ubuntu上安装udev 14.04

问题描述:

我已经安装了Ubuntu 14.04 Server(64位)。我无法在纯Ubuntu上安装udev 14.04

使用时:

sudo apt-get update 

打印此错误:

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

去除tmp.i /var/lib/dpkg/updates# sudo rm tmp.i apt-get的更新之后就OK,但...

当我试图“须藤apt-get upgrade':

Fetched 534 kB in 4s (112 kB/s)    
Reading package lists... Done 
[email protected]****:/# 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) 

我在网上找不到任何解决方案,尝试了很多方法,但没有任何工作......

+0

你有没有真的试图“须藤dpkg的--configure -a”? – diogovk 2014-12-10 11:38:37

+0

是的,没有结果。无论如何,我已经找到了解决方案... – kaczorro 2014-12-10 23:04:23

原因可能是在OVH服务器上的所有Ubuntu 14.04安装上发生该问题。我已经联系过技术支持,他们没有任何可能有助于“帮助自己”的答案。

收到此错误后:

nano /etc/init.d/udev 

后的### END INIT INFO补充:

exit 0   

保存并退出。

dpkg --configure -a   
apt-get upgrade   

再次编辑该文件,并删除exit 0,保存&退出 然后安装后续包正常工作似乎与系统重启后正常,没有那个可怕的错误消息不断出现。

此主题的临时解决方法:http://forum.ovh.co.uk/showthread.php?8480-udev-requires-hotplug-support-not-started/page2&s=2144010031f992268c5690726da09284

+0

可以确认它的工作原理。似乎它与使用不支持hotplug的旧版Linux内核的VPS主机有关。所以只有在OVH更新主机时才能解决。 – fmcato 2014-12-17 22:36:07

+0

谢谢,我一直有这个问题一个月,现在它解决了。 – 2015-03-24 10:07:31

对于那些在我之后谁到这里,我不得不编辑/usr/sbin/invoke-rc.d第一的意见后,添加退出0获得到的udev配置。

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 

然后运行:

dpkg --configure -a 

然后从调用-rc.d中取出退出0

不是编辑/etc/init.d/udev的两倍,你可以### END INIT INFO后只添加这一个换行符:

dpkg --configure -a || exit 0 

那样如果dpkg --configure失败它会退出,否则会继续正常。

或者,如果编辑的文件是不是你的东西,这将这样的伎俩:

[ ! "$(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