官网提示 linux需要这些动态库。depends on: zlib, fontconfig, freetype, X11 libs (libX11, libXext, libXrender)

在linux上执行

  1. ./wkhtmltopdf page-size A4 www.baidu.com pdf.pdf 报错

error while loading shared libraries: libXrender.so.1

  1. root@mag-sit:/home/mag-sit/wkhtmltox/bin# ./wkhtmltopdf –page-size A4 www.baidu.com pdf.pdf
  2. ./wkhtmltopdf: error while loading shared libraries: libXrender.so.: cannot open shared object file: No such file or directory
  3. root@mag-sit:/home/mag-sit/wkhtmltox/bin# cd /usr/lib/
  4. root@mag-sit:/usr/lib# ls
  5. accountsservice docker.io gnupg language-selector libcwidget.so. libisccc.so. liblwres.so. linux-boot-probes openssh policykit- rsyslog systemd update-notifier
  6. apt dpkg grub libau.so libcwidget.so.3.0. libisccc.so.90.0. liblwres.so.90.0. locale os-prober pppd sasl2 tar upstart
  7. byobu eject grub-legacy libau.so. libdns.so. libisccfg.so. libperl.so.5.18 man-db os-probes pt_chown sftp-server tasksel valgrind
  8. command-not-found gcc initramfs-tools libau.so.2.7 libdns.so.100.2. libisccfg.so.90.1. libperl.so.5.18. memtest86+ perl python2. software-properties tc w3m
  9. coreutils girepository-1.0 insserv libbind9.so. libgirepository-1.0.so. libisc.so. libxapian.so. mime perl5 python3 ssl tmpfiles.d x86_64-linux-gnu
  10. dbus-1.0 git-core klibc libbind9.so.90.0. libgirepository-1.0.so.1.0. libisc.so.95.5. libxapian.so.22.6. mysql pm-utils python3. sudo ubuntu-release-upgrader
  11. root@mag-sit:/usr/lib# ^C
  12. root@mag-sit:/usr/lib# apt-get install libXrender*
  13. Reading package lists... Done
  14. Building dependency tree
  15. Reading state information... Done
  16. Note, selecting 'libxrender1' for regex 'libXrender*'
  17. Note, selecting 'libxrender1-dbg' for regex 'libXrender*'
  18. Note, selecting 'libxrender-dev' for regex 'libXrender*'
  19. The following extra packages will be installed:
  20. libpthread-stubs0-dev libx11-dev libx11-doc libxau-dev libxcb1-dev
  21. libxdmcp-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev
  22. x11proto-render-dev xorg-sgml-doctools xtrans-dev
  23. Suggested packages:
  24. libxcb-doc
  25. The following NEW packages will be installed:
  26. libpthread-stubs0-dev libx11-dev libx11-doc libxau-dev libxcb1-dev
  27. libxdmcp-dev libxrender-dev libxrender1 libxrender1-dbg x11proto-core-dev
  28. x11proto-input-dev x11proto-kb-dev x11proto-render-dev xorg-sgml-doctools
  29. xtrans-dev
  30. upgraded, newly installed, to remove and not upgraded.
  31. Need to get , kB of archives.
  32. After this operation, 17.6 MB of additional disk space will be used.
  33. Do you want to continue? [Y/n] Y
  34. Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libxrender1 amd64 1:0.9.8-1build0.14.04.1 [17.9 kB]
  35. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libpthread-stubs0-dev amd64 0.3-4 [4,068 B]
  36. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main xorg-sgml-doctools all 1:1.11-1 [12.9 kB]
  37. Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main x11proto-core-dev all 7.0.26-1~ubuntu2 [700 kB]
  38. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libxau-dev amd64 1:1.0.8-1 [11.1 kB]
  39. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libxdmcp-dev amd64 1:1.1.1-1 [26.9 kB]
  40. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main x11proto-input-dev all 2.3-1 [139 kB]
  41. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main x11proto-kb-dev all 1.0.6-2 [269 kB]
  42. Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main xtrans-dev all 1.3.5-1~ubuntu14.04.1 [70.3 kB]
  43. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libxcb1-dev amd64 1.10-2ubuntu1 [76.6 kB]
  44. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libx11-dev amd64 2:1.6.2-1ubuntu2 [629 kB]
  45. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libx11-doc all 2:1.6.2-1ubuntu2 [1,448 kB]
  46. Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main x11proto-render-dev all 2:0.11.1-2 [20.1 kB]
  47. Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libxrender-dev amd64 1:0.9.8-1build0.14.04.1 [23.8 kB]
  48. Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libxrender1-dbg amd64 1:0.9.8-1build0.14.04.1 [62.4 kB]
  49. Fetched , kB in 6min 22s (, B/s)
  50. Selecting previously unselected package libxrender1:amd64.
  51. (Reading database ... files and directories currently installed.)
  52. Preparing to unpack .../libxrender1_1%3a0.9.8-1build0.14.04.1_amd64.deb ...
  53. Unpacking libxrender1:amd64 (:0.9.-1build0.14.04.) ...
  54. Selecting previously unselected package libpthread-stubs0-dev:amd64.
  55. Preparing to unpack .../libpthread-stubs0-dev_0.-4_amd64.deb ...
  56. Unpacking libpthread-stubs0-dev:amd64 (0.3-) ...
  57. Selecting previously unselected package xorg-sgml-doctools.
  58. Preparing to unpack .../xorg-sgml-doctools_1%3a1.-1_all.deb ...
  59. Unpacking xorg-sgml-doctools (:1.11-) ...
  60. Selecting previously unselected package x11proto-core-dev.
  61. Preparing to unpack .../x11proto-core-dev_7.0.26-~ubuntu2_all.deb ...
  62. Unpacking x11proto-core-dev (7.0.-~ubuntu2) ...
  63. Selecting previously unselected package libxau-dev:amd64.
  64. Preparing to unpack .../libxau-dev_1%3a1.0.8-1_amd64.deb ...
  65. Unpacking libxau-dev:amd64 (:1.0.-) ...
  66. Selecting previously unselected package libxdmcp-dev:amd64.
  67. Preparing to unpack .../libxdmcp-dev_1%3a1.1.1-1_amd64.deb ...
  68. Unpacking libxdmcp-dev:amd64 (:1.1.-) ...
  69. Selecting previously unselected package x11proto-input-dev.
  70. Preparing to unpack .../x11proto-input-dev_2.-1_all.deb ...
  71. Unpacking x11proto-input-dev (2.3-) ...
  72. Selecting previously unselected package x11proto-kb-dev.
  73. Preparing to unpack .../x11proto-kb-dev_1.0.6-2_all.deb ...
  74. Unpacking x11proto-kb-dev (1.0.-) ...
  75. Selecting previously unselected package xtrans-dev.
  76. Preparing to unpack .../xtrans-dev_1.3.5-~ubuntu14..1_all.deb ...
  77. Unpacking xtrans-dev (1.3.-~ubuntu14.04.1) ...
  78. Selecting previously unselected package libxcb1-dev:amd64.
  79. Preparing to unpack .../libxcb1-dev_1.-2ubuntu1_amd64.deb ...
  80. Unpacking libxcb1-dev:amd64 (1.10-2ubuntu1) ...
  81. Selecting previously unselected package libx11-dev:amd64.
  82. Preparing to unpack .../libx11-dev_2%3a1.6.2-1ubuntu2_amd64.deb ...
  83. Unpacking libx11-dev:amd64 (:1.6.-1ubuntu2) ...
  84. Selecting previously unselected package libx11-doc.
  85. Preparing to unpack .../libx11-doc_2%3a1.6.2-1ubuntu2_all.deb ...
  86. Unpacking libx11-doc (:1.6.-1ubuntu2) ...
  87. Selecting previously unselected package x11proto-render-dev.
  88. Preparing to unpack .../x11proto-render-dev_2%3a0.11.1-2_all.deb ...
  89. Unpacking x11proto-render-dev (:0.11.-) ...
  90. Selecting previously unselected package libxrender-dev:amd64.
  91. Preparing to unpack .../libxrender-dev_1%3a0.9.8-1build0.14.04.1_amd64.deb ...
  92. Unpacking libxrender-dev:amd64 (:0.9.-1build0.14.04.) ...
  93. Selecting previously unselected package libxrender1-dbg:amd64.
  94. Preparing to unpack .../libxrender1-dbg_1%3a0.9.8-1build0.14.04.1_amd64.deb ...
  95. Unpacking libxrender1-dbg:amd64 (:0.9.-1build0.14.04.) ...
  96. Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
  97. Setting up libxrender1:amd64 (:0.9.-1build0.14.04.) ...
  98. Setting up libpthread-stubs0-dev:amd64 (0.3-) ...
  99. Setting up xorg-sgml-doctools (:1.11-) ...
  100. Setting up x11proto-core-dev (7.0.-~ubuntu2) ...
  101. Setting up libxau-dev:amd64 (:1.0.-) ...
  102. Setting up libxdmcp-dev:amd64 (:1.1.-) ...
  103. Setting up x11proto-input-dev (2.3-) ...
  104. Setting up x11proto-kb-dev (1.0.-) ...
  105. Setting up xtrans-dev (1.3.-~ubuntu14.04.1) ...
  106. Setting up libxcb1-dev:amd64 (1.10-2ubuntu1) ...
  107. Setting up libx11-dev:amd64 (:1.6.-1ubuntu2) ...
  108. Setting up libx11-doc (:1.6.-1ubuntu2) ...
  109. Setting up x11proto-render-dev (:0.11.-) ...
  110. Setting up libxrender-dev:amd64 (:0.9.-1build0.14.04.) ...
  111. Setting up libxrender1-dbg:amd64 (:0.9.-1build0.14.04.) ...
  112. Processing triggers for libc-bin (2.19-0ubuntu6.) ...
  113. root@mag-sit:/usr/lib# ls
  114. accountsservice debug git-core klibc libbind9.so.90.0. libgirepository-1.0.so.1.0. libisc.so.95.5. libxapian.so.22.6. mysql pm-utils python3. sudo ubuntu-release-upgrader
  115. apt docker.io gnupg language-selector libcwidget.so. libisccc.so. liblwres.so. linux-boot-probes openssh policykit- rsyslog systemd update-notifier
  116. byobu dpkg grub libau.so libcwidget.so.3.0. libisccc.so.90.0. liblwres.so.90.0. locale os-prober pppd sasl2 tar upstart
  117. command-not-found eject grub-legacy libau.so. libdns.so. libisccfg.so. libperl.so.5.18 man-db os-probes pt_chown sftp-server tasksel valgrind
  118. coreutils gcc initramfs-tools libau.so.2.7 libdns.so.100.2. libisccfg.so.90.1. libperl.so.5.18. memtest86+ perl python2. software-properties tc w3m
  119. dbus-1.0 girepository-1.0 insserv libbind9.so. libgirepository-1.0.so. libisc.so. libxapian.so. mime perl5 python3 ssl tmpfiles.d x86_64-linux-gnu
  120. root@mag-sit:/usr/lib# cd /home/mag-sit/
  121. root@mag-sit:/home/mag-sit# ls
  122. 160526_rmFX73kM-.sql 160526_rmFX73kM-.sql data_backup jdk-7u80-linux-i586.gz jeewx.war sanpin TeamAction_goAdd.jsp tomcat.keystore wkhtmltox
  123. 160526_rmFX73kM-.sql beauty.--.log filemgr-linux64.elf jdk-7u80-linux-x64.gz linux_amd64 SanpinAction.class TeamAction_goAddOrder.jsp TripDetailService.class wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
  124. 160526_rmFX73kM-.sql beauty.log filemgr-linux64.tar.gz jeewx magvacations.war tar test.java upload wp20161011.sql
  125. root@mag-sit:/home/mag-sit# cd wkhtmltoxp
  126. bash: cd: wkhtmltoxp: No such file or directory
  127. root@mag-sit:/home/mag-sit# ls
  128. 160526_rmFX73kM-.sql 160526_rmFX73kM-.sql data_backup jdk-7u80-linux-i586.gz jeewx.war sanpin TeamAction_goAdd.jsp tomcat.keystore wkhtmltox
  129. 160526_rmFX73kM-.sql beauty.--.log filemgr-linux64.elf jdk-7u80-linux-x64.gz linux_amd64 SanpinAction.class TeamAction_goAddOrder.jsp TripDetailService.class wkhtmltox-0.12.4_linux-generic-amd64.tar.xz
  130. 160526_rmFX73kM-.sql beauty.log filemgr-linux64.tar.gz jeewx magvacations.war tar test.java upload wp20161011.sql
  131. root@mag-sit:/home/mag-sit# cd wkhtmltox
  132. root@mag-sit:/home/mag-sit/wkhtmltox# ls
  133. bin include lib share
  134. root@mag-sit:/home/mag-sit/wkhtmltox# cd bin/
  135. root@mag-sit:/home/mag-sit/wkhtmltox/bin# ls
  136. wkhtmltoimage wkhtmltopdf
  137. root@mag-sit:/home/mag-sit/wkhtmltox/bin# ./wkhtmltopdf –page-size A4 www.baidu.com pdf.pdf
  138. ./wkhtmltopdf: error while loading shared libraries: libfontconfig.so.: cannot open shared object file: No such file or directory
  139. root@mag-sit:/home/mag-sit/wkhtmltox/bin# ^C
  140. root@mag-sit:/home/mag-sit/wkhtmltox/bin#

安装完成后再次执行,上面的那条错误没有了。但是又有新的错误!继续安装

./wkhtmltopdf: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory

  1. root@mag-sit:/home/mag-sit/wkhtmltox/bin# apt-get install libfontconfig*
  2. Reading package lists... Done
  3. Building dependency tree
  4. Reading state information... Done
  5. Note, selecting 'libfontconfig' for regex 'libfontconfig*'
  6. Note, selecting 'libfontconfig1' for regex 'libfontconfig*'
  7. Note, selecting 'libfontconfig-dev' for regex 'libfontconfig*'
  8. Note, selecting 'libfontconfig1-dbg' for regex 'libfontconfig*'
  9. Note, selecting 'libfontconfig1-dev' for regex 'libfontconfig*'
  10. Note, selecting 'libfontconfig1' instead of 'libfontconfig'
  11. Note, selecting 'libfontconfig1-dev' instead of 'libfontconfig-dev'
  12. The following extra packages will be installed:
  13. binutils cpp cpp-4.8 fontconfig-config fonts-dejavu-core gcc gcc-4.8
  14. gcc-4.8-base libasan0 libatomic1 libc-dev-bin libc6 libc6-dev libcloog-isl4
  15. libexpat1 libexpat1-dev libfreetype6-dev libgcc-4.8-dev libgmp10 libgomp1
  16. libisl10 libitm1 libmpc3 libmpfr4 libpng12-dev libquadmath0 libstdc++
  17. libtsan0 linux-libc-dev manpages-dev pkg-config zlib1g-dev
  18. Suggested packages:
  19. binutils-doc cpp-doc gcc-4.8-locales gcc-multilib make autoconf automake1.
  20. libtool flex bison gdb gcc-doc gcc-4.8-multilib gcc-4.8-doc libgcc1

安装完成之后 貌似还得弄个字库  要不然生成的pdf乱码了 具体安装方法

linux使用wkhtmltopdf报错error while loading shared libraries:的更多相关文章

  1. 运行编译后的程序报错 error while loading shared libraries: lib*.so: cannot open shared object file: No such file or directory

    运行编译后的程序报错  error while loading shared libraries: lib*.so: cannot open shared object file: No such f ...

  2. 使用arm-none-eabi-gdb报错error while loading shared libraries: libncurses.so.5: cannot open shared object file: No such file or directory

    使用arm-none-eabi-gdb报错error while loading shared libraries: libncurses.so.5: cannot open shared objec ...

  3. 10gRAC运行srvctl报错error while loading shared libraries:

    数据库10g才会有这个错,因为11g的grid和oracle是分开的. [oracle@news01 orcl]$ srvctl /u01/app/oracle/db_1/jdk/jre/bin/ja ...

  4. 启动uwsgi报错error while loading shared libraries: libpcre.so.1:

    启动uwsgi时候报错: [root@ richie]# /usr/bin/uwsgi --ini /usr/local/nginx/conf/uwsgi.ini /usr/bin/uwsgi: er ...

  5. 解决tpcc_load 报错 error while loading shared libraries: libmysqlclient.so.20

    在刚开始导入tpcc数据仓库时,可能会遇到 error while loading shared libraries: libmysqlclient.so.20这个错误,找不到库文件. 但是,通过fi ...

  6. memcached安装报错 error while loading shared libraries: libevent-2.0.so.5: cannot open shared object file: No such file or directory解决

    我是从其他服务器scp来的memcached(~~~整个文件夹的那种,windows用多了的后遗症) 在准备运行 ./memcached -d -u root -l localhost -m 800 ...

  7. nginx检查报错 error while loading shared libraries: libprofiler.so.0: cannot open shared object file: No such file or directory

    在centos7.3上编译安装nginx-1.12.2 启动测试出错 [root@web02 local]# /usr/local/nginx/sbin/nginx -t /usr/local/ngi ...

  8. 【samtools】运行报错: error while loading shared libraries:libcrypto.so.1.0.0或libncurses.so.5或libtinfow.so.5

    samtools用conda安装后,总是出现共享库缺失的报错.即便你刚安装samtools时可以用,但后面在同一环境中安装其他相关软件,有可能产生了冲突,导致库替换,因而报错. 避免这种情况,可能最好 ...

  9. timesten报错:error while loading shared libraries: libaio.so.1: cannot open shared object file : No such file or directory

    我遇到的这个错是因为缺少依赖:libaio 直接yum -y install libaio 然后重新安装就OK了

随机推荐

  1. Android中使用ExpandableListView实现微信通讯录界面(完善仿微信APP)

    之前的博文<Android中使用ExpandableListView实现好友分组>我简单介绍了使用ExpandableListView实现简单的好友分组功能,今天我们针对之前的所做的仿微信 ...

  2. mysql删除重复记录语句的方法

    例如: id name value 1 a pp 2 a pp 3 b iii 4 b pp 5 b pp 6 c pp 7 c pp 8 c iii id是主键 要求得到这样的结果 id name ...

  3. IP报头

      位字段的值设置为二进制的0100表示IP版本4(IPv4).设置为0110表示IP版本6(IPv6)   位,它表示32位字长的IP报头长度,设计报头长度的原因是数据包可选字段大小会发生变化.IP ...

  4. Autofac 的点滴

    泛型类型的注册和使用 public interface IRepository<T> where T:class { } public interface ISchoolDetailRep ...

  5. NYOJ 954

    首先观察: 2! = 2×1                 = (2)10     = (10)2,        则第一个1是第2位,2!有1个质因数23! = 3×2×1             ...

  6. 不该活着的SqlHelper和DBHelper

    前言: 还记得刚学ADO.NET的情景么? 还记得当年是怎么从ADO.NET被忽悠到用SqlHelper的么? 话说从入门到走上工作岗位那些年,我们就一直被纯纯地教导或引导,ADO.NET太原始,得封 ...

  7. Hadoop学习笔记系列文章导航

    一.为何要学习Hadoop? 这是一个信息爆炸的时代.经过数十年的积累,很多企业都聚集了大量的数据.这些数据也是企业的核心财富之一,怎样从累积的数据里寻找价值,变废为宝炼数成金成为当务之急.但数据增长 ...

  8. 浅谈C#网络编程(一)

    阅读目录: 基础 Socket编程 多线程并发 阻塞式同步IO 基础 在现今软件开发中,网络编程是非常重要的一部分,本文简要介绍下网络编程的概念和实践. Socket是一种网络编程接口,它是对传输层T ...

  9. 闲话RPC调用

    原创文章转载请注明出处:@协思, http://zeeman.cnblogs.com 自SOA架构理念提出以来,应用程序间如何以最低耦合度通信的问题便呈现在所有架构师面前. 互联网系统的复杂度让我们不 ...

  10. 正确地编写Objective-C中的便捷方法

    在Objective-C中,如果某个类方法的返回类型就是这个类的实例(例如NSString类中的stringWithFormat:),就可以将这种类方法称为便捷方法(Convenience Metho ...