Não é possível sudo apt-get -f install por causa do problema jdk

4

Estou completamente perplexo. O problema é o seguinte.

user@mycomputer:~$ 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:
   openjdk-7-jdk
Suggested packages:
  visualvm
The following packages will be upgraded:
  openjdk-7-jdk
1 upgraded, 0 newly installed, 0 to remove and 322 not upgraded.
85 not fully installed or removed.
Need to get 0 B/16.3 MB of archives.
After this operation, 348 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
debconf: unable to initialize frontend: Dialog
debconf: (Dialog frontend will not work on a dumb terminal, an emacs shell buffer, or     without a controlling terminal.)
debconf: falling back to frontend: Readline
Selecting previously unselected package openjdk-7-jdk:i386.
(Reading database ... 258923 files and directories currently installed.)
Preparing to unpack .../openjdk-7-jdk_7u71-2.5.3-0ubuntu0.14.04.1_i386.deb ...
Unpacking openjdk-7-jdk:i386 (7u71-2.5.3-0ubuntu0.14.04.1) over (7u55-2.4.7-1ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/openjdk-7-jdk_7u71-2.5.3-    0ubuntu0.14.04.1_i386.deb (--unpack):
 trying to overwrite '/usr/lib/jvm/java-7-openjdk-i386/src.zip', which is also in     package openjdk-7-source 7u55-2.4.7-1ubuntu1
Errors were encountered while processing:
 /var/cache/apt/archives/openjdk-7-jdk_7u71-2.5.3-0ubuntu0.14.04.1_i386.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

Não sei o que excluir / remover. Alguma sugestão? Desde já, obrigado.

EDIT # 1

Adicionando saída da sugestão de Charles Green porque é impossível ler no comentário.

user@mycomputer:~$ sudo apt-get remove --purge openjdk-7-source
[sudo] password for user: 
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:
 openjdk-7-jdk : Depends: openjdk-7-jre (= 7u55-2.4.7-1ubuntu1) but 7u71-2.5.3-0ubuntu0.14.04.1 is to be installed
E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

EDIT # 2

Segunda sugestão de Charles Smith.

user@mycomputer:~$ sudo dpkg -i --force-overwrite /var/cache/apt/archives/openjdk-7-jdk_7u71-2.5.3-0ubuntu0.14.04.1_i386.deb
(Reading database ... 258923 files and directories currently installed.)
Preparing to unpack .../openjdk-7-jdk_7u71-2.5.3-0ubuntu0.14.04.1_i386.deb ...
Unpacking openjdk-7-jdk:i386 (7u71-2.5.3-0ubuntu0.14.04.1) over (7u55-2.4.7-1ubuntu1) ...
dpkg: warning: overriding problem because --force enabled:
dpkg: warning: trying to overwrite '/usr/lib/jvm/java-7-openjdk-i386/src.zip', which is also in package openjdk-7-source 7u55-2.4.7-1ubuntu1
dpkg: dependency problems prevent configuration of openjdk-7-jdk:i386:
 openjdk-7-jdk:i386 depends on openjdk-7-jre (= 7u71-2.5.3-0ubuntu0.14.04.1); however:
  Package openjdk-7-jre:i386 is not configured yet.

dpkg: error processing package openjdk-7-jdk:i386 (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 openjdk-7-jdk:i386

No entanto, se eu tentar sudo apt-get -f install , ainda recebo um erro.

EDIT 3

user@mycomputer:~$ sudo dpkg -i /var/cache/apt/archives/openjdk-7-jre_7u71-2.5.3-0ubuntu0.14.04.1_i386.deb
dpkg: error processing archive /var/cache/apt/archives/openjdk-7-jre_7u71-2.5.3-0ubuntu0.14.04.1_i386.deb (--install):
 cannot access archive: No such file or directory
Errors were encountered while processing:
 /var/cache/apt/archives/openjdk-7-jre_7u71-2.5.3-0ubuntu0.14.04.1_i386.deb

EDIT 4

user@mycomputer:~/Downloads$ sudo dpkg -i openjdk-7-jre_7u71-2.5.3-0ubuntu0.14.04.1_i386.deb 
(Reading database ... 258922 files and directories currently installed.)
Preparing to unpack openjdk-7-jre_7u71-2.5.3-0ubuntu0.14.04.1_i386.deb ...
Unpacking openjdk-7-jre:i386 (7u71-2.5.3-0ubuntu0.14.04.1) over (7u71-2.5.3-0ubuntu0.14.04.1) ...
dpkg: dependency problems prevent configuration of openjdk-7-jre:i386:
 openjdk-7-jre:i386 depends on openjdk-7-jre-headless (= 7u71-2.5.3-0ubuntu0.14.04.1); however:
  Package openjdk-7-jre-headless:i386 is not configured yet.

dpkg: error processing package openjdk-7-jre:i386 (--install):
 dependency problems - leaving unconfigured
Processing triggers for hicolor-icon-theme (0.13-1) ...
Processing triggers for bamfdaemon (0.5.1+14.04.20140409-0ubuntu1) ...
Rebuilding /usr/share/applications/bamf-2.index...
Processing triggers for desktop-file-utils (0.22-1ubuntu1) ...
Processing triggers for gnome-menus (3.10.1-0ubuntu2) ...
Processing triggers for mime-support (3.54ubuntu1) ...
Errors were encountered while processing:
 openjdk-7-jre:i386
    
por Henry David Thorough 29.11.2014 / 19:02

2 respostas

1

Existe um bug de dependência circular no OpenJDK7 para o qual um patch é publicado aqui.

    
por TrevorL 11.08.2015 / 13:06
0

Instale a ferramenta aptitude

sudo apt-get install aptitude

Executar aptitude

sudo aptitude

Na área inferior, você vê uma linha vermelha. Veja as propostas e escolha uma proposta adequada.

    
por A.B. 11.05.2015 / 09:58