Installation of JDK errors on Ubuntu

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.