Wkhtmltopdf 失败 (错误代码: -6). 消息: The switch --header-spacing, is not support using unpatched qt, and will be ignored.The switch --header-html, is not support using unpatched qt, and will be ignored.The switch --footer-html, is not support using unpatched qt, and will be ignored.QXcbConnection: Could not connect to display

 
解决方案如下:
使用源码安装wkhtmltopdf,步骤如下:
1、通过github下载源码,存放在本地/home下的wkhtmltopdf目录中.
  git clone https://github.com/wkhtmltopdf/wkhtmltopdf.git
2、安装编译环境,针对我当前的版本,需要执行命令如下:
  sudo scripts/build.py setup-schroot-jessie
3、为64位系统进行编译:
  scripts/build.py jessie-amd64
如果出现了错误信息,请检查依赖,并进行如下修复:
  apt-get install debootstrap schroot rinse git
重新执行步骤2,3。
 

问题:QXcbConnection: Could not connect to display的更多相关文章

  1. error: QXcbConnection: Could not connect to display

    /********************************************************************************* * error: QXcbConn ...

  2. QXcbConnection: Could not connect to display

    import matplotlib; matplotlib.use('agg') 注意:要添加到所有matplotlib前面,否则不起作用

  3. Ubuntu python-matplotlib安装couldn't connect to display ":0.0"

    先卸载旧的matplotlib库(sudo pip3 uninstall matplotlib),再利用命令 sudo apt-get install python-matplotlib安装,自动安装 ...

  4. Ubuntu16.04部署phantomjs的一个问题

    首先phantomjs是作为pyspider的一个外部依赖组件部署的. apt安装完出现问题: QXcbConnection: Could not connect to display Phantom ...

  5. Linux CentOS7 安装wkhtmltopdf工具

    wkhtmltopdf是一款将html文件转换成pdf格式的优秀的文件内容转换工具.它使用QT作为渲染引擎,目前它的RELEASE版尚不支持flex布局的Html5代码转换.使用flex的嵌套元素将会 ...

  6. Centos7.5安装VirtualBox-5.2

    1.查看自己的内核版本 [root@localhost /]# rpm -qa |grep kernel kernel-tools-libs-3.10.0-862.6.3.el7.x86_64 ker ...

  7. 安装phantomjs(Ubuntu版本 MacOS版本)

    安装phantomjs(Ubuntu版本) 首先:apt-get update # 更新软件列表. apt-get upgrade # 更新软件. 其次再执行如下步骤 步骤一下载包:wget http ...

  8. Ubuntu 守护进程

    项目中用的Qt开发的GUI程序,需要随机自启动. 最初尝试过使用SuperVisor,但是会出现下面的错误. qt.qpa.screen: QXcbConnection: Could not conn ...

  9. [raspberry pi3] opensuse使用splash中问题处理

    问题一: QXcbConnection: Could not connect to display :1594410864 解决方案: export QT_QPA_PLATFORM=offscreen

随机推荐

  1. unity导出工程导入到iOS原生工程中详细步骤

    一直想抽空整理一下unity原生工程导入iOS原生工程中的详细步骤.做iOS+vuforia+unity开发这么长时间了.从最初的小小白到现在的小白.中间趟过了好多的坑.也有一些的小小收货.做一个喜欢 ...

  2. 调用webapi 错误:使用 HTTP 谓词 POST 向虚拟目录发送了一个请求,而默认文档是不支持 GET 或 HEAD 以外的 HTTP 谓词的静态文件。的解决方案

    第一次调用webapi出错如下: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http:// ...

  3. 【跟着子迟品 underscore】如何优雅地写一个『在数组中寻找指定元素』的方法

    Why underscore (觉得这部分眼熟的可以直接跳到下一段了...) 最近开始看 underscore.js 源码,并将 underscore.js 源码解读 放在了我的 2016 计划中. ...

  4. pagerank

    http://jung.sourceforge.net/ https://github.com/louridas/pagerank/blob/aeb9b17ada1f925bb525961574f6d ...

  5. 微信菜单php 数组格式

    //备用 $menu['button']['0']['name'] = '积分'; $menu['button']['0']['sub_button']['0']['type'] = 'view'; ...

  6. maven 打包

    使用命令行形式打包 1.配置maven环境变量,在变量path中加入maven路径. 2.在要打包的项目目录下使用:Ctrl+shift+鼠标右键点击,点击 在此处打开命令行窗口. 在打开的命令行窗口 ...

  7. Mbatis Oracle 第一次插入失败 useGeneratedKeys

    <insert id="insertAgentInfo" parameterType="pd" useGeneratedKeys="false& ...

  8. CSS3-transform 转换/变换

    transform 向元素应用 2D 或 3D 转换.该属性允许我们对元素进行旋转.缩放.移动或倾斜. 兼容性: Internet Explorer 10.Firefox.Opera 支持 trans ...

  9. nginx平滑升级

    1.查询原来安装配置信息 [root@t-scrmap1-v-szzb local]# netstat -unlatp | grep nginx tcp 0 0 0.0.0.0:80 0.0.0.0: ...

  10. 中软培训第一周复习总结 --简单的HTML 与CSS

    一些需要记住的点: day1 HTML格式及简单标签: html 文件一般格式: 1 <html> 2 <head lang="en"> 3 <met ...