0

I'm trying to run Clion IDE on Ubuntu 22.04.

I installed JRE and I think I installed JDK by running:

sudo apt install -y openjdk-18-jdk

but when I run ./clion.sh I get:

No JDK found. Please validate either CLION_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.

Can anyone help?

Below are the installation instructions from Jetbrains I followed:

INSTALLATION INSTRUCTIONS
===============================================================================

  Linux Installation Instructions
  ------------------------------------------------------------------------------
  1. Unpack the CLion distribution archive that you downloaded to
     where you wish to install the program. We will refer to this destination
     location as your {installation home} below.

  2. Open a console and cd into "{installation home}/bin" and type:

       ./clion.sh

     to start the application. As a side effect, this will initialize various
     configuration files in the ~/.CLion2020.1 directory.
user997112
  • 667
  • 4
  • 14
  • 22

1 Answers1

0

CLion comes bundled with its own JDK so this really shouldn't occur even if you don't have JDK installed. If you have downloaded and unpacked the archive correctly, there should be a CLion-2020.1.1/jbr/bin/ folder that contains the JDKs you need.

Most likely you may have downloaded or copied the files from somewhere else, and these files are not executable. If so, just apply the permission change to these files and that should work:

chmod -R +x ./jbr/bin/

(you might also want to do this for some other files so that CLion can execute them and start up)

neo-mashiro
  • 101
  • 2
  • Maybe it is an answer. If so it is not complete. From your answer. you might also want to do this for some other files so that CLion can execute them and start up – David Apr 08 '23 at 11:02
  • @David It is incomplete but there's no way to tell which files are not executable, just guessing. I've seen people grabbing a subset of installation files from another machine and those files were causing the same issue. They did that on office computers to bypass some license management trouble or company policies, sometimes people don't have root access or there's a size limit on a single download task so they have to split it up on another machine and then transfer back. – neo-mashiro Apr 08 '23 at 11:52