https://panfake.com/2020/03/qxcbconnection-could-not-connect-to-display/
首先
vim ~/.bashrc
然后把下面的这句话加进去,第一行就可以
export QT_QPA_PLATFORM='offscreen'
运行如下命令使配置生效
source ~/.bashrc
再次运行phantomjs
,无报错成功进入。
https://panfake.com/2020/03/qxcbconnection-could-not-connect-to-display/
首先
vim ~/.bashrc
然后把下面的这句话加进去,第一行就可以
export QT_QPA_PLATFORM='offscreen'
运行如下命令使配置生效
source ~/.bashrc
再次运行phantomjs
,无报错成功进入。