23,124
社区成员
error: QXcbConnection: Could not connect to display-CSDN博客
安装qt遇到错误QXcbConnection: Could not connect to display Aborted
首先
vim ~/.bashrc
然后在里面添加
export QT_QPA_PLATFORM='offscreen'
即时生效
source ~/.bashrc
这样就可以
每次修改.bashrc后,使用source ~/.bashrc(或者 . ~/.bashrc)
就可以立刻加载修改后的设置,使之生效。
一般会在.bash_profile文件中显式调用.bashrc。登陆linux启动bash时首先会
去读取~/.bash_profile文件,这样~/.bashrc也就得到执行了,你的个性化设
置也就生效了。
原文链接:https://blog.csdn.net/qq_31159375/article/details/90073967
我的还是不可以所以继续查
vim /etc/profile
然后在里面添加
export DISPLAY=:0.0
即时生效
source /etc/profile
这样就可以
报错:QXcbConnection: Could not connect to display :0.0 Aborted
将export DISPLAY=:0.0改为export DISPLAY=<ip>:0.0ssh连接的IP是172.18.0.1
vim /etc/profile
export DISPLAY=172.18.0.1:0.0
source /etc/profile
重新安装qt
运行sudo ./qt-opensource-linux-x64-5.6.0.run
弹出安装界面