在Linux桌面下安装PyCharm的时候出现如下报错

root@ubuntu:~# cd pycharm-community-2021.1.1
root@ubuntu:~/pycharm-community-2021.1.1# ls
bin classpath.txt Install-Linux-tar.txt license
brokenPlugins.db help jbr plugins
build.txt icons.db lib product-info.json
root@ubuntu:~/pycharm-community-2021.1.1# cd bin/
root@ubuntu:~/pycharm-community-2021.1.1/bin# ls
format.sh inspect.sh printenv.py pycharm.svg
fsnotifier libdbm64.so pycharm64.vmoptions pycharm.vmoptions
fsnotifier64 log.xml pycharm.png restart.py
idea.properties ltedit.sh pycharm.sh
root@ubuntu:~/pycharm-community-2021.1.1/bin# ./pycharm.sh
Error: A JNI error has occurred, please check your installation and try again
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/intellij/idea/Main has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:756)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:468)
at java.net.URLClassLoader.access$100(URLClassLoader.java:74)
at java.net.URLClassLoader$1.run(URLClassLoader.java:369)
at java.net.URLClassLoader$1.run(URLClassLoader.java:363)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:362)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:601)
root@ubuntu:~/pycharm-community-2021.1.1/bin#

此问题为Java版本太低,需要使用新的jdk版本

49 = Java 5
50 = Java 6
51 = Java 7
52 = Java 8
53 = Java 9
54 = Java 10
55 = Java 11
56 = Java 12
57 = Java 13
58 = Java 14
59 = Java 15
60 = Java 16

安装Java

root@ubuntu:~# tar xvf jdk-16.0.1_linux-aarch64_bin.tar.gz
root@ubuntu:~# mv jdk-16.0.1 /usr/local/
root@ubuntu:~# cd /usr/local/
root@ubuntu:/usr/local# ls
Ascend dcmi games jdk-16.0.1 lib python3.7.5 share
bin etc include jdk1.8.0_291 man sbin src
root@ubuntu:/usr/local# vim /etc/profile
root@ubuntu:/usr/local# source /etc/profile

环境变量配置文件

root@ubuntu:/usr/local# cat /etc/profile
# /etc/profile: system-wide .profile file for the Bourne shell (sh(1))
# and Bourne compatible shells (bash(1), ksh(1), ash(1), ...). if [ "${PS1-}" ]; then
if [ "${BASH-}" ] && [ "$BASH" != "/bin/sh" ]; then
# The file bash.bashrc already sets the default PS1.
# PS1='\h:\w\$ '
if [ -f /etc/bash.bashrc ]; then
. /etc/bash.bashrc
fi
else
if [ "`id -u`" -eq 0 ]; then
PS1='# '
else
PS1='$ '
fi
fi
fi if [ -d /etc/profile.d ]; then
for i in /etc/profile.d/*.sh; do
if [ -r $i ]; then
. $i
fi
done
unset i
fi #用于设置python3.7.5库文件路径
export LD_LIBRARY_PATH=/usr/local/python3.7.5/lib:$LD_LIBRARY_PATH
#如果用户环境存在多个python3版本,则指定使用python3.7.5版本
export PATH=/usr/local/python3.7.5/bin:$PATH # control log level. 0-DEBUG, 1-INFO, 2-WARNING, 3-ERROR, default level is WARNING.
export GLOG_v=2 # Conda environmental options
LOCAL_ASCEND=/usr/local/Ascend # the root directory of run package # lib libraries that the run package depends on
export LD_LIBRARY_PATH=${LOCAL_ASCEND}/add-ons/:${LOCAL_ASCEND}/ascend-toolkit/latest/fwkacllib/lib64:${LOCAL_ASCEND}/driver/lib64:${LOCAL_ASCEND}/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe/op_tiling:${LD_LIBRARY_PATH} # Environment variables that must be configured
export TBE_IMPL_PATH=${LOCAL_ASCEND}/ascend-toolkit/latest/opp/op_impl/built-in/ai_core/tbe # TBE operator implementation tool path
export ASCEND_OPP_PATH=${LOCAL_ASCEND}/ascend-toolkit/latest/opp # OPP path
export PATH=${LOCAL_ASCEND}/ascend-toolkit/latest/fwkacllib/ccec_compiler/bin/:${PATH} # TBE operator compilation tool path
export PYTHONPATH=${TBE_IMPL_PATH}:${PYTHONPATH} # Python library that TBE implementation depends on export JAVA_HOME=/usr/local/jdk-16.0.1
export JRE_HOME=/usr/local/jdk-16.0.1/jre/
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib
export PATH=$JAVA_HOME/bin:$JAVA_HOME/jre/bin:$PATH:$HOME/bin
root@ubuntu:/usr/local#

PyCharm在Linux安装出现报错-Java Runtime (class file version 55.0)的更多相关文章

  1. java运行报错 has been compiled by a more recent version of the Java Runtime (class file version 55.0), this version of the Java Runtime only recognizes class file versions up to 52.0

    解决方法: 解决办法: 在项目的属性里设置jdk版本,方法是右击项目-->properties-->java compiler --> Enable project specific ...

  2. 解决Python3.7安装pygame报错You are using pip version 10.0.1, however version 19.1 is available.

    背景: 学习python开发中,需要用到pygame插件,因此按照参考书<Python编程实践,从入门到实践>指引安装Pygame包. 但是利用pip 命令安装 .whl 文件时,报错(如 ...

  3. 云笔记项目- 上传文件报错"java.lang.IllegalStateException: File has been moved - cannot be read again"

    在做文件上传时,当写入上传的文件到文件时,会报错“java.lang.IllegalStateException: File has been moved - cannot be read again ...

  4. 8.4 sikuli 集成进eclipse 报错:Unsupported major.minor version 51.0

    8.3中的问题Win32Util.dll: Can't load 32-bit .dll on a AMD 64 bit platform  解决之后,执行还是会有报错:Unsupported maj ...

  5. Linux安装Apache报错:Cannot find a valid baseurl for repo: base/7/x86_64解决方案

    最近使用CentOS7学习,安装安装Apache时候,使用yum安装Apache报错:本文适合CentOS7和RHEL7 # yum install httpd 出现:cannot find a va ...

  6. 关于spark入门报错 java.io.FileNotFoundException: File file:/home/dummy/spark_log/file1.txt does not exist

    不想看废话的可以直接拉到最底看总结 废话开始: master: master主机存在文件,却报 执行spark-shell语句:  ./spark-shell  --master spark://ma ...

  7. go搭建beego框架 go安装bee报错 github.com/derekparker/delve@v1.4.0: parsing go.mod:

    go搭建beego框架 go安装bee报错 go使用beego框架的时候,需要安装bee,安装的时候遇到一些坑报错,这里跟大家分享一下,有助于快速安装bee,搭建好beego环境 1. 首先切换到go ...

  8. tomcat启动报错:Unsupported major.minor version 51.0

    myeclipse中添加项目后,发现项目启动时报错:Unsupported major.minor version 51.0 因为tomcat使用的jdk版本不支持你项目的jdk版本,需要你在myec ...

  9. linux安装oracle 报错[INS-20802] Oracle Net Configuration Assistant failed 解决办法

    [INS-20802] Oracle Net Configuration Assistant failed 首先从LinuxIDC.com下载这个补丁包,然后用 unzip p8670579_1120 ...

  10. Linux安装oracle报错解决

    安装报错:[oracle@centos1 database]$ ./runInstaller Starting Oracle Universal Installer... Checking insta ...

随机推荐

  1. Docker-compose安装Wordpress

    Docker-compose实战Wordpress 96 iXiAo9 2019.01.10 18:54 字数 82 阅读 105评论 0喜欢 0 Docker-compose实战Wordpress ...

  2. 项目:口令保管箱,批处理文件配置.bat

    #! python3 import sys import pyperclip PASSWORDS = {'email': 'F7minlBDDuvMJuxESSKHFhTxFtjVB6', 'blog ...

  3. 原来sed不支持非贪婪匹配

    场景 从GISAID上面批量下载下来的序列id很长,格式如下: 太长了,并且makeblastdb的时候-parse_seqids参数会导致报错,大概是长度太长不符合要求无法处理之类的. 不作处理去掉 ...

  4. Linux CentOS Docker Asp.net Core MVC 模板项目的部署

    本文只是记录 .net core 3.1 项目的基本部署方法,灵活应对不同情况与需求 工具:VS 2019    Linux CentOS 7 x64 Xshell     Xftp Docker 安 ...

  5. DHCP分配IP的流程

    1.DHCP客户端以广播的形式发送DHCP Discover报文 2.所有的DHCP服务端都可以接收到这个DHCP Discover报文,所有的DHCP服务端都会给出响应,向DCHP客户端发送一个DH ...

  6. pytesseract文字识别

    import pytesseract from PIL import Image im=Image.open('image.png') print(pytesseract.image_to_strin ...

  7. 002基本的Dos命令

    002基本的Dos命令 1.开启Dos控制台的几种方式 几种打开CMD的方式: 直接在菜单中搜索"命令提示符". Win+R,输入cmd.(推荐) 在任意文件夹下面,按住Shift ...

  8. 用requests库的get( )函数访问搜狗网站20次

    代码: import requests from bs4 import BeautifulSoup def getHTMLText(url): try: r=requests.get(url,time ...

  9. Blog作业02

    目录 前言 设计与分析 踩坑心得 改进建议 总结 前言 这三次作业的题目数量虽然增多,但是在题量加大的同时,这三次作业集的难度也相应的下去了,难度降低的同时也保证了作业集题目的质量.这三次的作业的知识 ...

  10. Vue中 ref、$refs区别与使用

    定义2个组件: 子组件ChildrenSubRef.vue: 1 <template> 2 <div> 3 4 </div> 5 </template> ...