Ubuntu 14.10-udev 拒绝更新

Ubuntu 14.10-udev 拒绝更新

在 Ubuntu 14.10 上,Udev 拒绝更新。

我执行了这段代码:

sudo apt-get upgrade

输出结果如下:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
You might want to run ‘apt-get -f install’ to correct these.
The following packages have unmet dependencies.
udev : Depends: libudev1 (= 208-8ubuntu8.1) but 208-8ubuntu8.2 is installed
E: Unmet dependencies. Try using -f.

于是我做了:

sudo apt-get -f install

输出:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following extra packages will be installed:
udev
The following packages will be upgraded:
udev
1 to upgrade, 0 to newly install, 0 to remove and 40 not to upgrade.
Need to get 0 B/804 kB of archives.
After this operation, 4,096 B disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 176972 files and directories currently installed.)
Preparing to unpack .../udev_208-8ubuntu8.2_amd64.deb ...
dpkg: error processing archive /var/cache/apt/archives/udev_208-8ubuntu8.2_amd64.deb (--unpack):
fgets gave an empty string from `/var/lib/dpkg/info/udev.triggers'
Errors were encountered while processing:
/var/cache/apt/archives/udev_208-8ubuntu8.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

然后我尝试:

sudo apt-get install udev

输出结果如下:

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be upgraded:
udev
1 to upgrade, 0 to newly install, 0 to remove and 40 not to upgrade.
Need to get 804 kB of archives.
After this operation, 4,096 B disk space will be freed.
Get:1 http://archive.ubuntu.com/ubuntu/ utopic-updates/main udev amd64 208-8ubuntu8.2 
[804 kB]
Fetched 804 kB in 0s (873 kB/s)
(Reading database ... 176972 files and directories currently installed.)
Preparing to unpack .../udev_208-8ubuntu8.2_amd64.deb ...
dpkg: error processing archive /var/cache/apt/archives/udev_208-8ubuntu8.2_amd64.deb (--unpack):
fgets gave an empty string from `/var/lib/dpkg/info/udev.triggers'
Errors were encountered while processing:
/var/cache/apt/archives/udev_208-8ubuntu8.2_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

这样做了几次,甚至删除了.deb包并强制重新下载该包,以防下载不当,则会产生同样的效果!

然后尝试;

突触

E: /var/cache/apt/archives/udev_208-8ubuntu8.2_amd64.deb:
fgets gave an empty string from `/var/lib/dpkg/info/udev.triggers'

因此;

(synaptic:3584): GLib-CRITICAL **: g_child_watch_add_full: assertion 'pid > 0' failed
(Reading database ... 176972 files and directories currently installed.)
Preparing to unpack .../udev_208-8ubuntu8.2_amd64.deb ...
dpkg: error processing archive /var/cache/apt/archives/udev_208-8ubuntu8.2_amd64.deb (--unpack):
fgets gave an empty string from `/var/lib/dpkg/info/udev.triggers'
Errors were encountered while processing:
 /var/cache/apt/archives/udev_208-8ubuntu8.2_amd64.deb
E: Sub-process /usrReading package lists... Done

Building dependency tree       
Reading state information... Done
The following packages will be upgraded:    
udev    
1 to upgrade, 0 to newly install, 0 to remove and 40 not to upgrade.
E: Could not get lock /var/cache/apt/archives/lock - open (11: Resource temporarily unavailable)
E: Unable to lock directory /var/cache/apt/archives//bin/dpkg returned an error code (1)

A package failed to install.  Trying to recover:

这让我停下了脚步!

怎么办?

答案1

跑步:

sudo dpkg --force-all --install /var/cache/apt/archives/udev_208-8ubuntu8.2_amd64.deb

相关内容