我不能在普通的ubuntu 14.04上安装udev

时间:2014-12-01 18:24:38

标签: ubuntu udev dpkg

我已经安装了Ubuntu 14.04服务器(64位)。

使用时:

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 update就行了,但是......

当我尝试'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)

到目前为止,我无法在网上找到任何解决方案,尝试了很多方法,但没有任何效果......

4 个答案:

答案 0 :(得分: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

答案 1 :(得分:5)

对于那些跟在我后面的人,我必须编辑/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

然后从invoke-rc.d

中删除退出0

答案 2 :(得分: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

答案 3 :(得分:0)

对于在OVH服务器上获得此密码的人,不再需要上述黑客!

This answer创建的

proxy应该起作用:

...

recyclerView = new RecyclerView();
adapter = new CustomAdapter();
recyclerView.setAdapter(adapter);

...
     

为我工作。有关更多信息,请访问Dimitri's comment in Ubuntu's bug tracker

这似乎是因为OVH没有在系统中放入$ apt-get download udev $ sudo dpkg -i --force-confmiss udev_*_amd64.deb $ sudo apt-get upgrade 。 10/10