You need to enable JavaScript to run this app.
最新活动
大模型
产品
解决方案
定价
生态与合作
支持与服务
开发者
了解我们

Ubuntu 17.10.1安装jdk-8u161-linux-arm64-vfp-hflt.tar.gz遇到问题

Troubleshooting JDK 8 Installation on Ubuntu 17.10.1 (VMware)

Hey there, let's break down what's causing your installation issues and fix it step by step.

The Core Problem

You're attempting to install the ARM64 version of JDK 8 (jdk-8u161-linux-arm64-vfp-hflt.tar.gz) on an Ubuntu 17.10.1 VM running in VMware Workstation Pro. Almost certainly, your Ubuntu VM is using the standard x86_64 (amd64) architecture—ARM64 binaries won't run on x86_64 systems, which is why your setup is failing.

Step 1: Confirm Your System Architecture

First, verify your VM's architecture to be sure. Run this command in the terminal:

uname -m

If the output is x86_64, you have an amd64 system and need the x64 version of JDK 8.

Step 2: Clean Up the Incompatible JDK Setup

Let's remove the incorrect ARM64 JDK and its alternative configurations:

  1. Remove the java alternative entry:
    sudo update-alternatives --remove java /usr/lib/java/jdk1.8.0_161/bin/java
    
  2. Remove the javac alternative entry:
    sudo update-alternatives --remove javac /usr/lib/java/jdk1.8.0_161/bin/javac
    
  3. Delete the ARM64 JDK folder:
    sudo rm -rf /usr/lib/java/jdk1.8.0_161
    

Step 3: Install the Correct x64 JDK

  1. Download the x64 version of JDK 8: jdk-8u161-linux-x64.tar.gz (from the official archive you used earlier, just select the x64 package).
  2. Extract the tar.gz file and copy the resulting jdk1.8.0_161 folder to /usr/lib/java (same directory you created before).
  3. Reconfigure the alternatives system with the correct binaries:
    sudo update-alternatives --install "/usr/bin/java" "java" "/usr/lib/java/jdk1.8.0_161/bin/java" 1
    
    sudo update-alternatives --install "/usr/bin/javac" "javac" "/usr/lib/java/jdk1.8.0_161/bin/javac" 1
    

Step 4: Verify the Installation

Check if the setup works by running these commands:

java -version
javac -version

You should see output confirming JDK 1.8.0_161 is active.

Note: If You Need ARM64 Environment

If you actually intended to run an ARM64 system, you'll need to create an ARM-based VM in VMware Workstation Pro (note: older versions of VMware may have limited ARM support, and Ubuntu 17.10 is end-of-life—consider using a newer Ubuntu ARM release for better compatibility).

内容的提问来源于stack exchange,提问作者rattlesnake

火山引擎 最新活动