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

在linux上执行

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

error while loading shared libraries: libXrender.so.1

root@mag-sit:/home/mag-sit/wkhtmltox/bin# ./wkhtmltopdf –page-size A4 www.baidu.com pdf.pdf
./wkhtmltopdf: error while loading shared libraries: libXrender.so.: cannot open shared object file: No such file or directory
root@mag-sit:/home/mag-sit/wkhtmltox/bin# cd /usr/lib/
root@mag-sit:/usr/lib# ls
accountsservice docker.io gnupg language-selector libcwidget.so. libisccc.so. liblwres.so. linux-boot-probes openssh policykit- rsyslog systemd update-notifier
apt dpkg grub libau.so libcwidget.so.3.0. libisccc.so.90.0. liblwres.so.90.0. locale os-prober pppd sasl2 tar upstart
byobu eject grub-legacy libau.so. libdns.so. libisccfg.so. libperl.so.5.18 man-db os-probes pt_chown sftp-server tasksel valgrind
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
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
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
root@mag-sit:/usr/lib# ^C
root@mag-sit:/usr/lib# apt-get install libXrender*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libxrender1' for regex 'libXrender*'
Note, selecting 'libxrender1-dbg' for regex 'libXrender*'
Note, selecting 'libxrender-dev' for regex 'libXrender*'
The following extra packages will be installed:
libpthread-stubs0-dev libx11-dev libx11-doc libxau-dev libxcb1-dev
libxdmcp-dev x11proto-core-dev x11proto-input-dev x11proto-kb-dev
x11proto-render-dev xorg-sgml-doctools xtrans-dev
Suggested packages:
libxcb-doc
The following NEW packages will be installed:
libpthread-stubs0-dev libx11-dev libx11-doc libxau-dev libxcb1-dev
libxdmcp-dev libxrender-dev libxrender1 libxrender1-dbg x11proto-core-dev
x11proto-input-dev x11proto-kb-dev x11proto-render-dev xorg-sgml-doctools
xtrans-dev
upgraded, newly installed, to remove and not upgraded.
Need to get , kB of archives.
After this operation, 17.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] Y
Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libxrender1 amd64 1:0.9.8-1build0.14.04.1 [17.9 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libpthread-stubs0-dev amd64 0.3-4 [4,068 B]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main xorg-sgml-doctools all 1:1.11-1 [12.9 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main x11proto-core-dev all 7.0.26-1~ubuntu2 [700 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libxau-dev amd64 1:1.0.8-1 [11.1 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libxdmcp-dev amd64 1:1.1.1-1 [26.9 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main x11proto-input-dev all 2.3-1 [139 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main x11proto-kb-dev all 1.0.6-2 [269 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main xtrans-dev all 1.3.5-1~ubuntu14.04.1 [70.3 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libxcb1-dev amd64 1.10-2ubuntu1 [76.6 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libx11-dev amd64 2:1.6.2-1ubuntu2 [629 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main libx11-doc all 2:1.6.2-1ubuntu2 [1,448 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty/main x11proto-render-dev all 2:0.11.1-2 [20.1 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libxrender-dev amd64 1:0.9.8-1build0.14.04.1 [23.8 kB]
Get: http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main libxrender1-dbg amd64 1:0.9.8-1build0.14.04.1 [62.4 kB]
Fetched , kB in 6min 22s (, B/s)
Selecting previously unselected package libxrender1:amd64.
(Reading database ... files and directories currently installed.)
Preparing to unpack .../libxrender1_1%3a0.9.8-1build0.14.04.1_amd64.deb ...
Unpacking libxrender1:amd64 (:0.9.-1build0.14.04.) ...
Selecting previously unselected package libpthread-stubs0-dev:amd64.
Preparing to unpack .../libpthread-stubs0-dev_0.-4_amd64.deb ...
Unpacking libpthread-stubs0-dev:amd64 (0.3-) ...
Selecting previously unselected package xorg-sgml-doctools.
Preparing to unpack .../xorg-sgml-doctools_1%3a1.-1_all.deb ...
Unpacking xorg-sgml-doctools (:1.11-) ...
Selecting previously unselected package x11proto-core-dev.
Preparing to unpack .../x11proto-core-dev_7.0.26-~ubuntu2_all.deb ...
Unpacking x11proto-core-dev (7.0.-~ubuntu2) ...
Selecting previously unselected package libxau-dev:amd64.
Preparing to unpack .../libxau-dev_1%3a1.0.8-1_amd64.deb ...
Unpacking libxau-dev:amd64 (:1.0.-) ...
Selecting previously unselected package libxdmcp-dev:amd64.
Preparing to unpack .../libxdmcp-dev_1%3a1.1.1-1_amd64.deb ...
Unpacking libxdmcp-dev:amd64 (:1.1.-) ...
Selecting previously unselected package x11proto-input-dev.
Preparing to unpack .../x11proto-input-dev_2.-1_all.deb ...
Unpacking x11proto-input-dev (2.3-) ...
Selecting previously unselected package x11proto-kb-dev.
Preparing to unpack .../x11proto-kb-dev_1.0.6-2_all.deb ...
Unpacking x11proto-kb-dev (1.0.-) ...
Selecting previously unselected package xtrans-dev.
Preparing to unpack .../xtrans-dev_1.3.5-~ubuntu14..1_all.deb ...
Unpacking xtrans-dev (1.3.-~ubuntu14.04.1) ...
Selecting previously unselected package libxcb1-dev:amd64.
Preparing to unpack .../libxcb1-dev_1.-2ubuntu1_amd64.deb ...
Unpacking libxcb1-dev:amd64 (1.10-2ubuntu1) ...
Selecting previously unselected package libx11-dev:amd64.
Preparing to unpack .../libx11-dev_2%3a1.6.2-1ubuntu2_amd64.deb ...
Unpacking libx11-dev:amd64 (:1.6.-1ubuntu2) ...
Selecting previously unselected package libx11-doc.
Preparing to unpack .../libx11-doc_2%3a1.6.2-1ubuntu2_all.deb ...
Unpacking libx11-doc (:1.6.-1ubuntu2) ...
Selecting previously unselected package x11proto-render-dev.
Preparing to unpack .../x11proto-render-dev_2%3a0.11.1-2_all.deb ...
Unpacking x11proto-render-dev (:0.11.-) ...
Selecting previously unselected package libxrender-dev:amd64.
Preparing to unpack .../libxrender-dev_1%3a0.9.8-1build0.14.04.1_amd64.deb ...
Unpacking libxrender-dev:amd64 (:0.9.-1build0.14.04.) ...
Selecting previously unselected package libxrender1-dbg:amd64.
Preparing to unpack .../libxrender1-dbg_1%3a0.9.8-1build0.14.04.1_amd64.deb ...
Unpacking libxrender1-dbg:amd64 (:0.9.-1build0.14.04.) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Setting up libxrender1:amd64 (:0.9.-1build0.14.04.) ...
Setting up libpthread-stubs0-dev:amd64 (0.3-) ...
Setting up xorg-sgml-doctools (:1.11-) ...
Setting up x11proto-core-dev (7.0.-~ubuntu2) ...
Setting up libxau-dev:amd64 (:1.0.-) ...
Setting up libxdmcp-dev:amd64 (:1.1.-) ...
Setting up x11proto-input-dev (2.3-) ...
Setting up x11proto-kb-dev (1.0.-) ...
Setting up xtrans-dev (1.3.-~ubuntu14.04.1) ...
Setting up libxcb1-dev:amd64 (1.10-2ubuntu1) ...
Setting up libx11-dev:amd64 (:1.6.-1ubuntu2) ...
Setting up libx11-doc (:1.6.-1ubuntu2) ...
Setting up x11proto-render-dev (:0.11.-) ...
Setting up libxrender-dev:amd64 (:0.9.-1build0.14.04.) ...
Setting up libxrender1-dbg:amd64 (:0.9.-1build0.14.04.) ...
Processing triggers for libc-bin (2.19-0ubuntu6.) ...
root@mag-sit:/usr/lib# ls
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
apt docker.io gnupg language-selector libcwidget.so. libisccc.so. liblwres.so. linux-boot-probes openssh policykit- rsyslog systemd update-notifier
byobu dpkg grub libau.so libcwidget.so.3.0. libisccc.so.90.0. liblwres.so.90.0. locale os-prober pppd sasl2 tar upstart
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
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
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
root@mag-sit:/usr/lib# cd /home/mag-sit/
root@mag-sit:/home/mag-sit# ls
160526_rmFX73kM-.sql 160526_rmFX73kM-.sql data_backup jdk-7u80-linux-i586.gz jeewx.war sanpin TeamAction_goAdd.jsp tomcat.keystore wkhtmltox
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
160526_rmFX73kM-.sql beauty.log filemgr-linux64.tar.gz jeewx magvacations.war tar test.java upload wp20161011.sql
root@mag-sit:/home/mag-sit# cd wkhtmltoxp
bash: cd: wkhtmltoxp: No such file or directory
root@mag-sit:/home/mag-sit# ls
160526_rmFX73kM-.sql 160526_rmFX73kM-.sql data_backup jdk-7u80-linux-i586.gz jeewx.war sanpin TeamAction_goAdd.jsp tomcat.keystore wkhtmltox
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
160526_rmFX73kM-.sql beauty.log filemgr-linux64.tar.gz jeewx magvacations.war tar test.java upload wp20161011.sql
root@mag-sit:/home/mag-sit# cd wkhtmltox
root@mag-sit:/home/mag-sit/wkhtmltox# ls
bin include lib share
root@mag-sit:/home/mag-sit/wkhtmltox# cd bin/
root@mag-sit:/home/mag-sit/wkhtmltox/bin# ls
wkhtmltoimage wkhtmltopdf
root@mag-sit:/home/mag-sit/wkhtmltox/bin# ./wkhtmltopdf –page-size A4 www.baidu.com pdf.pdf
./wkhtmltopdf: error while loading shared libraries: libfontconfig.so.: cannot open shared object file: No such file or directory
root@mag-sit:/home/mag-sit/wkhtmltox/bin# ^C
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

root@mag-sit:/home/mag-sit/wkhtmltox/bin# apt-get install libfontconfig*
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libfontconfig' for regex 'libfontconfig*'
Note, selecting 'libfontconfig1' for regex 'libfontconfig*'
Note, selecting 'libfontconfig-dev' for regex 'libfontconfig*'
Note, selecting 'libfontconfig1-dbg' for regex 'libfontconfig*'
Note, selecting 'libfontconfig1-dev' for regex 'libfontconfig*'
Note, selecting 'libfontconfig1' instead of 'libfontconfig'
Note, selecting 'libfontconfig1-dev' instead of 'libfontconfig-dev'
The following extra packages will be installed:
binutils cpp cpp-4.8 fontconfig-config fonts-dejavu-core gcc gcc-4.8
gcc-4.8-base libasan0 libatomic1 libc-dev-bin libc6 libc6-dev libcloog-isl4
libexpat1 libexpat1-dev libfreetype6-dev libgcc-4.8-dev libgmp10 libgomp1
libisl10 libitm1 libmpc3 libmpfr4 libpng12-dev libquadmath0 libstdc++
libtsan0 linux-libc-dev manpages-dev pkg-config zlib1g-dev
Suggested packages:
binutils-doc cpp-doc gcc-4.8-locales gcc-multilib make autoconf automake1.
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. BPM嵌入式流程解决方案分享

    一.需求分析由于企业业务的独特性或者企业高层独特的管理思想,很多客户选择了自行开发业务系统的方式来实现独有的竞争力. 这类信息系统通常经过了多年的开发,伴随着企业的发展一直在不断优化,与企业的业务非常 ...

  2. Android 关于ijkplayer

    基于ijkplayer封装支持简单界面UI定制的视频播放器 可以解析ts格式的so库 怎样编译出可以解析ts等格式的so库?就是编译的时候需要在哪一步修改配置? 一些电视台的m3u8 CCTV1综合, ...

  3. Python学习基础

    1.使用范围: 大数据 .图像处理.web .运维.爬虫.自动化.科学计算 2.准备环境: linux/mac python 3.5.2 ipython vim/sublime/atom 3.列表 3 ...

  4. JS高级前端开发群加群说明及如何晋级

    JS高级前端开发群加群说明 一.文章背景: 二. 高级群: 三. 加入方式: 四. 说明:   一.文章背景: 去年年初建了几个群,在不经意间火了,一直排在“前端开发”关键字搜索结果第一名.当然取得这 ...

  5. 打造TypeScript的Visual Studio Code开发环境

    打造TypeScript的Visual Studio Code开发环境 本文转自:https://zhuanlan.zhihu.com/p/21611724 作者: 2gua TypeScript是由 ...

  6. 简述 OAuth 2.0 的运作流程

    本文将以用户使用 github 登录网站留言为例,简述 OAuth 2.0 的运作流程. 假如我有一个网站,你是我网站上的访客,看了文章想留言表示「朕已阅」,留言时发现有这个网站的帐号才能够留言,此时 ...

  7. iOS开发系列--地图与定位

    概览 现在很多社交.电商.团购应用都引入了地图和定位功能,似乎地图功能不再是地图应用和导航应用所特有的.的确,有了地图和定位功能确实让我们的生活更加丰富多彩,极大的改变了我们的生活方式.例如你到了一个 ...

  8. 《AngularJS深度剖析与最佳实践》简介

    由于年末将至,前阵子一直忙于工作的事务,不得已暂停了微信订阅号的更新,我将会在后续的时间里尽快的继续为大家推送更多的博文.毕竟一个人的力量微薄,精力有限,希望大家能理解,仍然能一如既往的关注和支持sh ...

  9. 布里斯班Twilight Bay Run半程马拉松

    自从8月3日跑了半马以后,又一鼓作气报了11月份的西昌马拉松.与第一次马拉松的只求完赛目标不同,第二次当然想取得一个更好的成绩.所以8月份练的比较猛,基本上是练2.3天休息一天,周么还要拉个长于21公 ...

  10. 物联网实验4 alljoyn物联网实验之手机局域网控制设备

    AllJoyn开源物联网协议框架,官方描述是一个能够使连接设备之间进行互操作的通用软件框架和系统服务核心集,也是一个跨制造商来创建动态近端网络的软件应用.高通已经将该项目捐赠给了一个名为“AllSee ...