在ubuntu下初次安装pycharm, 遇到的错误No JDK found.

在ubuntu下安装pycharm:
键入 sh pycharm.sh后遇到的错误No JDK found. 的错误:No JDK found. Please validate either PYCHARM_JDK, JDK_HOME or JAVA_HOME environment variable points to valid JDK installation.

解决方法如下:

  1. Open Terminal from Application Dash or press Ctrl+Alt+T

  2. Update repository:

    sudo add-apt-repository ppa:openjdk-r/ppa
    sudo apt update

  3. Optional: To search available distributions of openjdk, use the following command:

    apt search openjdk

  4. Install the appropriate version with the following command:

    sudo apt install openjdk-8-jdk
    sudo apt install openjdk-8-source

  5. For JAVA_HOME (Environment Variable) type command as shown below, in “Terminal” using your installation path…

    export JAVA_HOME=/usr/lib/jvm/java-8-openjdk-i386

(Note: /usr/lib/jvm/java-8-openjdk-i386 is symbolically used here just for demostration. 路径名按实际修改)

  1. For PATH (Environment Variable) type command as shown below, in Terminal:
    export PATH= $PATH: $JAVA_HOME/bin

你可能感兴趣的:(在ubuntu下初次安装pycharm, 遇到的错误No JDK found.)