CentOS8安装pycharm报错Can't connect to X11 window server using ':0' as the value of the DIS(

Posted smoggy

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了CentOS8安装pycharm报错Can't connect to X11 window server using ':0' as the value of the DIS(相关的知识,希望对你有一定的参考价值。

  在CentOS8 安装pycharm报出如下错误,原来是自己画蛇添足的用sudo执行pycharm.sh,没有按照Install说明里边的直接执行 ./pycharm.sh。

原因见这里:https://www.cnblogs.com/qingqing74647464/p/8685837.html

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.
No protocol specified
2020-03-30 03:39:39,467 [    621]   WARN -        #com.intellij.idea.Main - java.awt.AWTError: Cant connect to X11 window server using :0 as the value of the DISPLAY variable. 
java.util.concurrent.ExecutionException: java.awt.AWTError: Cant connect to X11 window server using :0 as the value of the DISPLAY variable.
    at java.base/java.util.concurrent.CompletableFuture.reportGet(CompletableFuture.java:395)
    at java.base/java.util.concurrent.CompletableFuture.get(CompletableFuture.java:1999)
    at com.intellij.idea.StartupUtil.runInEdtAndWait(StartupUtil.java:678)
    at com.intellij.idea.StartupUtil.lambda$showUserAgreementAndConsentsIfNeeded$15(StartupUtil.java:673)
    at com.intellij.ui.AppUIUtil.showConsentsAgreementIfNeeded(AppUIUtil.java:332)
    at com.intellij.idea.StartupUtil.showUserAgreementAndConsentsIfNeeded(StartupUtil.java:673)
    at com.intellij.idea.StartupUtil.startApp(StartupUtil.java:231)
    at com.intellij.idea.StartupUtil.prepareApp(StartupUtil.java:213)
    at com.intellij.ide.plugins.MainRunner.lambda$start$0(MainRunner.java:45)
    at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.awt.AWTError: Cant connect to X11 window server using :0 as the value of the DISPLAY variable.
    at java.desktop/sun.awt.X11GraphicsEnvironment.initDisplay(Native Method)
    at java.desktop/sun.awt.X11GraphicsEnvironment$1.run(X11GraphicsEnvironment.java:102)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.desktop/sun.awt.X11GraphicsEnvironment.<clinit>(X11GraphicsEnvironment.java:61)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:315)
    at java.desktop/java.awt.GraphicsEnvironment$LocalGE.createGE(GraphicsEnvironment.java:101)
    at java.desktop/java.awt.GraphicsEnvironment$LocalGE.<clinit>(GraphicsEnvironment.java:83)
    at java.desktop/java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment.java:129)
    at java.desktop/sun.awt.X11.XToolkit.<clinit>(XToolkit.java:232)
    at java.base/java.lang.Class.forName0(Native Method)
    at java.base/java.lang.Class.forName(Class.java:315)
    at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:588)
    at java.desktop/java.awt.Toolkit$2.run(Toolkit.java:583)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.desktop/java.awt.Toolkit.getDefaultToolkit(Toolkit.java:582)
    at java.desktop/java.awt.Toolkit.getEventQueue(Toolkit.java:1499)
    at java.desktop/java.awt.EventQueue.invokeLater(EventQueue.java:1318)
    at com.intellij.idea.StartupUtil.lambda$scheduleInitUi$9(StartupUtil.java:265)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
    ... 1 more

 

以上是关于CentOS8安装pycharm报错Can't connect to X11 window server using ':0' as the value of the DIS(的主要内容,如果未能解决你的问题,请参考以下文章

yolov5 5.0 报错日常Can‘t get attribute ‘SPPF‘ on <module ‘models.common‘ from ‘D:\Pycharm\Code\yolov5

pycharm 安装第三方库报错:AttributeError: 'module' object has no attribute 'main'

pycharm 安装第三方库报错:AttributeError: 'module' object has no attribute 'main'

2019-08-18 Pycharm的运行错误can't find '__main__' module

pycharm报错ModuleNotFoundError: No module named 'selenium'

window环境下ImportError: cannot import name 'Bar' from 'pyecharts'