web-dev-qa-db-fra.com

Openjdk-7-jre installé, mais pas de binaires

J'ai exécuté

Sudo apt-get update
Sudo apt-get install openjdk-7-jre

et le paquet semble s'être installé proprement, mais/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/était vide à l'exception du programme policytool

J'ai également installé openjdk-7-jdk, et/usr/lib/jvm/Java-7-openjdk-AMD64/bin/a été rempli correctement, mais/usr/lib/jvm/Java-7-openjdk-AMD64/bin/a été correctement rempli, mais/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/est resté vide.

Alors maintenant, je suis dans un état où javac, jar, javadoc, etc., mais pas de Java

$ ls /usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin
policytool*
$ find /usr/lib/jvm/Java-7-openjdk-AMD64/ -name Java -print
$

dpkg -L openjdk-7-jre indique qu'il n'y a pas de fichier exécutable Java dans le package. dpkg -S /usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/Java indique qu'il devrait être présent.

Ai-je corrompu une base de données quelque part? Comment puis-je le réparer?

J'ai essayé des solutions évidentes, telles que la désactivation de ppas dans les sources logicielles, l'exécution de apt-get clean et apt-get update, apt-get purge openjdk-7-jre, etc.


Mise à jour: j'ai exécuté ces commandes:

$ which Java
/usr/bin/Java
$ Java -version
Java version "1.7.0_80"
$ ls -l /usr/bin/Java
/usr/bin/Java -> /etc/alternatives/Java
$ ls -l /etc/alternatives/Java
/etc/alternatives/Java -> /usr/lib/jvm/Java-7-Oracle/jre/bin/Java

C'est très bien, mais je besoin d'exécuter Openjdk 7, pas la version Oracle. Je construis Android et le système de construction est verrouillé sur une version spécifique.

Tout cela a fonctionné jusqu'à hier lorsqu'une commande Sudo update-alternatives --config Java s'est mal passée et que j'ai essayé de désinstaller et de réinstaller le paquet openjdk7, sans que la réinstallation soit effectuée correctement.

1
Edward Falk

Les fichiers que vous recherchez ne sont pas dans openjdk-7-jre; ils sont dans openjdk-7-jre-headless.

Le paquetage openjdk-7-jre-headless installe la liste de fichiers suivante (à partir de l'installation d'Ubuntu 15.10 AMD64):

/.
/usr
/usr/lib
/usr/lib/jvm
/usr/lib/jvm/.Java-1.7.0-openjdk-AMD64.jinfo
/usr/lib/jvm/Java-7-openjdk-AMD64
/usr/lib/jvm/Java-7-openjdk-AMD64/man
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1
/usr/lib/jvm/Java-7-openjdk-AMD64/jre
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1/rmiregistry.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1/pack200.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1/keytool.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1/orbd.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1/rmid.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1/servertool.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1/unpack200.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1/tnameserv.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja_JP.UTF-8/man1/Java.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1/rmiregistry.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1/pack200.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1/keytool.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1/orbd.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1/rmid.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1/servertool.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1/unpack200.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1/tnameserv.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/man1/Java.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/THIRD_PARTY_README
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/Assembly_EXCEPTION
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/rt.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/currency.data
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images/cursors
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images/cursors/motif_LinkDrop32x32.gif
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images/cursors/motif_MoveNoDrop32x32.gif
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images/cursors/motif_LinkNoDrop32x32.gif
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images/cursors/motif_MoveDrop32x32.gif
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images/cursors/motif_CopyNoDrop32x32.gif
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images/cursors/invalid32x32.gif
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images/cursors/motif_CopyDrop32x32.gif
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/jvm.hprof.txt
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/javazic.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/classlist
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/management-agent.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/security
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/security/US_export_policy.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/security/local_policy.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/jsse.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/jce.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/cmm
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/cmm/PYCC.pf
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/cmm/LINEAR_RGB.pf
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/cmm/sRGB.pf
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/cmm/GRAY.pf
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/cmm/CIEXYZ.pf
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libinstrument.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libj2krb5.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/headless
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/headless/libmawt.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/server
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/server/libjvm.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/server/Xusage.txt
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjawt.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjsdt.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libunpack.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libawt.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libicedtea-sound.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libnpt.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libhprof.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjsound.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libj2gss.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjaas_unix.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libzip.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libnio.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjavalcms.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libverify.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libj2pcsc.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libmanagement.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libmlib_image.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/jli
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/jli/libjli.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libsaproc.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libdt_socket.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjava.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libsctp.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libnet.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libattach.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjavajpeg.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/jvm.cfg-default
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libj2pkcs11.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjava_crw_demo.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjsig.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libjdwp.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/libfontmanager.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/management
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/resources.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/ext
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/ext/icedtea-sound.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/ext/zipfs.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/ext/sunjce_provider.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/ext/sunpkcs11.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/ext/dnsns.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/ext/localedata.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/meta-index
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/jar.binfmt
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/rhino.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/jexec
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/compilefontconfig.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/charsets.jar
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/orbd
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/pack200
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/keytool
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/Java
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/rmiregistry
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/tnameserv
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/rmid
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/servertool
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/bin/unpack200
/usr/lib/jvm/Java-7-openjdk-AMD64/bin
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/Java-rmi.cgi
/usr/share
/usr/share/doc
/usr/share/doc/openjdk-7-jre-headless
/usr/share/doc/openjdk-7-jre-headless/Java_HOME
/usr/share/doc/openjdk-7-jre-headless/NEWS.IcedTea.gz
/usr/share/doc/openjdk-7-jre-headless/README.alternatives
/usr/share/doc/openjdk-7-jre-headless/AUTHORS.IcedTea
/usr/share/doc/openjdk-7-jre-headless/copyright
/usr/share/doc/openjdk-7-jre-headless/changelog.Debian.gz
/usr/share/doc/openjdk-7-jre-headless/README.Debian
/usr/share/doc/openjdk-7-jre-headless/README.IcedTea.gz
/usr/share/binfmts
/usr/share/lintian
/usr/share/lintian/overrides
/usr/share/lintian/overrides/openjdk-7-jre-headless
/etc
/etc/Java-7-openjdk
/etc/Java-7-openjdk/fontconfig.properties
/etc/Java-7-openjdk/images
/etc/Java-7-openjdk/images/cursors
/etc/Java-7-openjdk/images/cursors/cursors.properties
/etc/Java-7-openjdk/sound.properties
/etc/Java-7-openjdk/logging.properties
/etc/Java-7-openjdk/jvm-AMD64.cfg
/etc/Java-7-openjdk/accessibility.properties
/etc/Java-7-openjdk/net.properties
/etc/Java-7-openjdk/swing.properties
/etc/Java-7-openjdk/tz.properties
/etc/Java-7-openjdk/calendars.properties
/etc/Java-7-openjdk/flavormap.properties
/etc/Java-7-openjdk/psfontj2d.properties
/etc/Java-7-openjdk/security
/etc/Java-7-openjdk/security/nss.cfg
/etc/Java-7-openjdk/security/Java.policy
/etc/Java-7-openjdk/security/Java.security
/etc/Java-7-openjdk/management
/etc/Java-7-openjdk/management/jmxremote.password
/etc/Java-7-openjdk/management/management.properties
/etc/Java-7-openjdk/management/jmxremote.access
/etc/Java-7-openjdk/management/snmp.acl
/etc/Java-7-openjdk/content-types.properties
/etc/Java-7-openjdk/psfont.properties.ja
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1/rmiregistry.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1/pack200.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1/keytool.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1/orbd.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1/rmid.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1/servertool.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1/unpack200.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1/tnameserv.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja_JP.UTF-8/man1/Java.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/ja
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1/rmiregistry.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1/pack200.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1/keytool.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1/orbd.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1/rmid.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1/servertool.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1/unpack200.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1/tnameserv.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/man/man1/Java.1.gz
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/man/ja
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/fontconfig.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/images/cursors/cursors.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/sound.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/logging.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/accessibility.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/net.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/swing.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/tz.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/calendars.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/flavormap.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/psfontj2d.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/security/nss.cfg
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/security/cacerts
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/security/Java.policy
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/security/Java.security
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/jvm.cfg
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/AMD64/server/libjsig.so
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/management/jmxremote.password
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/management/management.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/management/jmxremote.access
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/management/snmp.acl
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/content-types.properties
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/psfont.properties.ja
/usr/lib/jvm/Java-7-openjdk-AMD64/jre/lib/zi
/usr/lib/jvm/Java-7-openjdk-AMD64/docs
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/orbd
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/pack200
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/keytool
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/Java
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/rmiregistry
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/tnameserv
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/rmid
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/servertool
/usr/lib/jvm/Java-7-openjdk-AMD64/bin/unpack200
/usr/lib/jvm/Java-1.7.0-openjdk-AMD64
2
saiarcot895