自动更新不起作用

自动更新不起作用

当我收到新更新时,我无法安装它们。当我尝试安装时,我收到以下错误消息。

installArchives() failed: Preconfiguring packages ...
Preconfiguring packages ...
Preconfiguring packages ...
Preconfiguring packages ...
(Reading database ... 
(Reading database ... 5%%
(Reading database ... 10%%
(Reading database ... 15%%
(Reading database ... 20%%
(Reading database ... 25%%
(Reading database ... 30%%
(Reading database ... 35%%
(Reading database ... 40%%
(Reading database ... 45%%
(Reading database ... 50%%
(Reading database ... 55%%
(Reading database ... 60%%
(Reading database ... 65%%
(Reading database ... 70%%
(Reading database ... 75%%
(Reading database ... 80%%
(Reading database ... 85%%
(Reading database ... 90%%
(Reading database ... 95%%
(Reading database ... 100%%
(Reading database ... 191976 files and directories currently installed.)
Preparing to replace resolvconf 1.63ubuntu11 (using .../resolvconf_1.63ubuntu14_all.deb) ...
Unpacking replacement resolvconf ...
Preparing to replace libutouch-geis1 2.2.9-0ubuntu2 (using .../libutouch-geis1_2.2.9-0ubuntu3_i386.deb) ...
Unpacking replacement libutouch-geis1 ...
Preparing to replace vino 3.4.1-0ubuntu1 (using .../vino_3.4.2-0ubuntu1_i386.deb) ...
Unpacking replacement vino ...
Processing triggers for ureadahead ...
ureadahead will be reprofiled on next reboot
Processing triggers for man-db ...
Processing triggers for gconf2 ...
Processing triggers for desktop-file-utils ...
Processing triggers for bamfdaemon ...
Rebuilding /usr/share/applications/bamf.index...
Processing triggers for gnome-menus ...
Processing triggers for libglib2.0-0 ...
Setting up oracle-java7-installer (7u3-0~eugenesan~precise4) ...
Downloading...
--2012-05-23 19:40:37--  http://download.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz
Resolving download.oracle.com (download.oracle.com)... 223.224.12.144, 223.224.12.146
Connecting to download.oracle.com (download.oracle.com)|223.224.12.144|:80... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz [following]
--2012-05-23 19:40:38--  https://edelivery.oracle.com/otn-pub/java/jdk/7u3-b04/jdk-7u3-linux-i586.tar.gz
Resolving edelivery.oracle.com (edelivery.oracle.com)... 173.223.2.174
Connecting to edelivery.oracle.com (edelivery.oracle.com)|173.223.2.174|:443... connected.
HTTP request sent, awaiting response... 302 Moved Temporarily
Location: http://download.oracle.com/errors/download-fail-1505220.html [following]
--2012-05-23 19:40:41--  http://download.oracle.com/errors/download-fail-1505220.html
Connecting to download.oracle.com (download.oracle.com)|223.224.12.144|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5307 (5.2K) [text/html]
Saving to: `./jdk-7u3-linux-i586.tar.gz'

     0K .....                                                 100%% 52.9K=0.1s

2012-05-23 19:40:41 (52.9 KB/s) - `./jdk-7u3-linux-i586.tar.gz' saved [5307/5307]

Download done.
sha256sum mismatch jdk-7u3-linux-i586.tar.gz
Oracle JDK 7 is NOT installed.
dpkg: error processing oracle-java7-installer (--configure):
 subprocess installed post-installation script returned error exit status 1
No apport report written because MaxReports is reached already
Setting up resolvconf (1.63ubuntu14) ...
Setting up libutouch-geis1 (2.2.9-0ubuntu3) ...
Setting up vino (3.4.2-0ubuntu1) ...
Processing triggers for resolvconf ...
Processing triggers for libc-bin ...
ldconfig deferred processing now taking place
Errors were encountered while processing:
 oracle-java7-installer
Error in function: 

答案1

这是 oracle-java7-installer 下载的软件包的问题。下载软件包时,它们具有所谓的校验和。校验和基本上是通过查看软件包内容而创建的唯一字符串。这是在将软件包上传到存储库时创建的,然后您的计算机在下载软件包时会创建自己的校验和。然后,您的计算机会验证您的校验和是否与存储库校验和匹配,如果它们不同,则不会安装该软件包。

我猜这是 repo 的问题,很快就会修复。与此同时,您可以禁用该特定软件包的更新(称为固定或保留),以便继续安装所有其他更新。执行此操作的命令是:

sudo su
echo oracle-java7-installer hold | dpkg --set-selections

您现在应该能够正常运行更新,并且 oracle-java7-installer 的更新将被忽略。当您想取消固定包并再次尝试更新它时,只需重新安装包即可:

sudo apt-get install oracle-java7-installer

有关固定的更多信息:https://help.ubuntu.com/community/PinningHowto

答案2

我遇到了完全相同的问题,并按照这篇文章中的步骤操作并使其工作:

http://rootzwiki.com/topic/23008-howto-install-java-7-on-ubuntu-1204/

相关内容