Quando executo o java -version, obtenho isto:
bash: /usr/bin/java: No such file or directory
Eu segui vários guias on-line para instalar o java. Eu segui todos os passos, mas ainda assim recebo esse erro. Talvez eu tenha feito errado - não sei.
Saída de: dpkg -l jdk*
dpkg-query: no packages found matching jdk*
Saída de: ls -l /usr/bin/java
lrwxrwxrwx 1 root root 22 Nov 16 17:21 /usr/bin/java -> /etc/alternatives/java
Saída de: sudo add-apt-repository ppa:webupd8team/java
add-apt-repository: command not found
Saída de: file "$(readlink -e "$(type -P java)")"
/usr/local/java/jdk1.7.0_45/bin/java: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.9, BuildID[sha1]=0x6849323f527575e206a1b6449617e809158e82be, not stripped
Saída de ldd "$(readlink -e "$(type -P java)")
not a dynamic executable
Versão do Debian, Ouput de uname -a
:
Linux Cyneox 3.7-trunk-amd64 #1 SMP Debian 3.7.2-0+kali8 x86_64 GNU/Linux
@ Teresa E Junior
Desculpe, não posso comentar essas postagens por algum motivo, problema de link estático.
As python-software-properties retornaram esse erro, que é o que eu recebo para a maioria dos programas que eu tento instalar:
E: Package 'python-software-properties' has no installation candidate
Além disso, eu corri o comando que você mencionou acima, e digitar java -version ainda não faz nada.
Joseph R, isso foi tudo que eu digitei:
root@Cyneox:/usr/bin# apt-get install ia32-libs ia32-libs:i386
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'ia32-libs' has no installation candidate
E: Unable to locate package ia32-libs
root@Cyneox:/usr/bin# apt-get install openjdk-7-jre
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package openjdk-7-jre is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
E: Package 'openjdk-7-jre' has no installation candidate
Mas as duas primeiras linhas que você me deu funcionaram.
A saída de cat /etc/apt/sources.list /etc/apt/sources.list.d/*
:
#
# deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot amd64 LIVE/INSTALL Binary 20130905-07:57]/ kali contrib main non-free
#deb cdrom:[Debian GNU/Linux 7.0 _Kali_ - Official Snapshot amd64 LIVE/INSTALL Binary 20130905-07:57]/ kali contrib main non-free
## Security updates
# Line commented out by installer because it failed to verify:
#deb http://security.kali.org/kali-security kali/updates main contrib non-free
deb http://http.debian.net/debian/ wheezy-backports main contrib
deb http://archive.canonical.com/ lucid partner
cat: /etc/apt/sources.list.d/*: No such file or directory
Joseph, apliquei sua correção na atualização e tudo estava indo bem ... até:
Setting up openjdk-7-jre-headless:amd64 (7u25-2.3.10-1~deb7u1) ...
update-alternatives: error: cannot stat file '/etc/alternatives/java': Too many levels of symbolic links
dpkg: error processing openjdk-7-jre-headless:amd64 (--configure):
subprocess installed post-installation script returned error exit status 2
dpkg: dependency problems prevent configuration of ca-certificates-java:
ca-certificates-java depends on openjdk-6-jre-headless (>= 6b16-1.6.1-2) | java6-runtime-headless; however:
Package openjdk-6-jre-headless is not installed.
Package java6-runtime-headless is not installed.
Package openjdk-7-jre-headless:amd64 which provides java6-runtime-headless is not configured yet.
dpkg: error processing ca-certificates-java (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-7-jre:amd64:
openjdk-7-jre:amd64 depends on openjdk-7-jre-headless (= 7u25-2.3.10-1~deb7u1); however:
Package openjdk-7-jre-headless:amd64 is not configured yet.
dpkg: error processing openjdk-7-jre:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of icedtea-7-jre-jamvm:amd64:
icedtea-7-jre-jamvm:amd64 depends on openjdk-7-jre-headless (= 7u25-2.3.10-1~deb7u1); however:
Package openjdk-7-jre-headless:amd64 is not configured yet.
dpkg: error processing icedtea-7-jre-jamvm:amd64 (--configure):
dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of openjdk-7-jre-lib:
openjdk-7-jre-lib depends on openjdk-7-jre-headless (>= 7~b130~pre0); however:
Package openjdk-7-jre-headless:amd64 is not configured yet.
dpkg: error processing openjdk-7-jre-lib (--configure):
dependency problems - leaving unconfigured
Errors were encountered while processing:
openjdk-7-jre-headless:amd64
ca-certificates-java
openjdk-7-jre:amd64
icedtea-7-jre-jamvm:amd64
openjdk-7-jre-lib
E: Sub-process /usr/bin/dpkg returned an error code (1)
Então eu tentei apt-get -f install
, mas isso ainda falhou ...