views:

37

answers:

2

I try to install jdk and jre by using 'apt-get' command, but something wrong occured:


......
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:
sun-java6-bin: Depends: sun-java6-jre (= 6.20dlj-0ubuntu1.9.10) but it is not going to be installed
unixodbc: Depends: odbcinst1debian1 (>= 2.2.11-3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


I have tried 'apt-get -f install'


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:
odbcinst1debian1 sun-java6-jre
Suggested packages:
sun-java6-plugin ia32-sun-java6-plugin sun-java6-fonts ttf-kochi-gothic
ttf-sazanami-gothic ttf-kochi-mincho ttf-sazanami-mincho
The following NEW packages will be installed:
odbcinst1debian1 sun-java6-jre
0 upgraded, 2 newly installed, 0 to remove and 297 not upgraded.
4 not fully installed or removed.
Need to get 0B/6,476kB of archives
After this operation, 15.0MB of additional disk space will be used.
Do you want to continue [Y/n]? Y
E: Invalid archive signature
E: Prior errors apply to /var/cache/apt/archives /odbcinst1debian1_2.2.11-16ubuntu1_i386.deb
debconf: apt-extracttemplates failed: Bad file descriptor
Preconfiguring packages ...
(Reading database ... 129572 files and directories currently installed.)
Unpacking sun-java6-jre (from .../sun-java6-jre_6.20dlj-0ubuntu1.9.10_all.deb) ...
sun-dlj-v1-1 license has already been accepted
dpkg: error processing /var/cache/apt/archives/sun-java6-jre_6.20dlj- 0ubuntu1.9.10_all.deb (--unpack):
corrupted filesystem tarfile - corrupted package archive
dpkg-deb: `/var/cache/apt/archives/odbcinst1debian1_2.2.11-16ubuntu1_i386.deb' is not a debian format archive
dpkg: error processing /var/cache/apt/archives /odbcinst1debian1_2.2.11-16ubuntu1_i386.deb (--unpack):
subprocess dpkg-deb --control returned error exit status 2 Errors were encountered while processing:
/var/cache/apt/archives/sun-java6-jre_6.20dlj-0ubuntu1.9.10_all.deb
/var/cache/apt/archives/odbcinst1debian1_2.2.11-16ubuntu1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)


and the error still exists.
Now, this error will appear even when I in stall other packages:


$sudo apt-get install p7zip
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:
sun-java6-bin: Depends: sun-java6-jre (= 6.20dlj-0ubuntu1.9.10) but it is not going to be installed
unixodbc: Depends: odbcinst1debian1 (>= 2.2.11-3) but it is not going to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).


All 'apt-get' commands will show that error, what should I do?

+1  A: 

Use Synaptic

Goto shell

type sudo synaptic

search for the package

check it for installation.

apply changes.

org.life.java
+1  A: 

dpkg: error processing /var/cache/apt/archives/sun-java6-jre_6.20dlj- 0ubuntu1.9.10_all.deb (--unpack): corrupted filesystem tarfile - corrupted package archive

Try clearing what is in your cache (/var/cache/apt) and try again with the -f flag

It will have to download the packages again, but looks like the ones you have now are corrupted anyway...

Matthieu