I installed the JDK in accordance with the method provided in a blog (portal) on the Internet, and then run the java-version command to view the Java version of the Times wrong.
Error content:
BASH:/usr/lib/jvm/jdk1.8.0_131/bin/java:no such file or directory
After finding a lot of information on the Internet and finally solved, the solution is to enter commands at the command line and execute:
(This was because there is some-bit libraries is missing in your Ubuntu-bit)
Apt-get Install libc6-i386
Operation Result:
[Email protected]:/usr/bin# java-Versionbash:/usr/lib/jvm/jdk1.8.0_131/bin/java:no such file or Directory[email protected]:/usr/bin# Apt-get Install libc6-i386 is reading the package list ... Completing the dependency tree that is analyzing the package is reading state information ... Complete the following packages are installed automatically and are not needed now: Linux-headers-4.4.0-31 linux-headers-4.4.0-31-Generic Linux-image-4.4.0-31-generic linux-image-extra-4.4.0-31-Genericuse' Apt-get autoremove 'to remove them. The following "new" packages will be installed: Libc6-i386 upgraded.0 packages, 1 new packages installed, 0 packages to uninstall, 4packages have not been upgraded. Need to download2,209KB of packages. will be consumed after decompression9,865KB of extra space. Get:1 http://cn.archive.ubuntu.com/ubuntu/trusty-updates/main libc6-i386 amd64 2.19-0ubuntu6.11 [2,209 KB]Download 2,209 KB, time 2 seconds (1,056 kb/s) Selecting previously unselected Packagelibc6-i386. (Reading Database ... The system is currently installed a total of278904files and directories. ) Preparing to unpack .../libc6-i386_2.19-0ubuntu6.11_amd64.deb ... Unpacking Libc6-i386 (2.19-0ubuntu6.11) ... Setting Libc6-i386 (2.19-0ubuntu6.11) ... Processing triggers forLibc-bin (2.19-0ubuntu6.11) ... [Email protected]:/usr/bin# Java-Versionjava version"1.8.0_131"Java (TM) SE Runtime Environment (build1.8.0_131-B11) Java HotSpot (TM) Server VM (Build25.131-B11, Mixed mode) [Email protected]:/usr/bin#
The issue to note is that you need to modify the. bashrc file (or etc/profile) when you configure the JDK environment, and make sure that you execute the code after you modify it to take effect:
SOURCE ~//etc/profile
Installation of JDK errors on Ubuntu