【问题标题】:I can't install udev on plain ubuntu 14.04我无法在普通的 ubuntu 14.04 上安装 udev
【发布时间】:2015-01-29 20:01:44
【问题描述】:

我已经安装了普通的 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)

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

【问题讨论】:

  • 你试过“sudo dpkg --configure -a”吗?
  • 是的,没有结果。无论如何,我已经找到了解决方案......

标签: ubuntu udev dpkg


【解决方案1】:

原因可能是 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

【讨论】:

  • 可以确认它有效。似乎它与使用不支持热插拔的旧 linux 内核的 VPS 主机有关。所以只有当 OVH 更新他们的主机时才会解决。
  • 谢谢,这个问题困扰我一个月了,现在解决了。
【解决方案2】:

对于那些在我之后到达这里的人,我必须编辑 /usr/sbin/invoke-rc.d 在第一个 cmets 之后添加一个出口 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中移除exit 0

【讨论】:

    【解决方案3】:

    您可以在### END INIT INFO 之后的换行符上添加它,而不是编辑两次/etc/init.d/udev

    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
    

    【讨论】:

      【解决方案4】:

      对于在 OVH 服务器上获得此功能的人,不再需要上述技巧!

      proxyThis answer 应该可以工作:

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

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

      这似乎是因为 OVH 没有将/etc/init/udev.conf 放入您的系统中。 10/10

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2015-09-23
        • 2016-03-24
        • 2016-02-16
        • 2016-10-30
        • 2015-01-28
        相关资源
        最近更新 更多