-
-
yangm 数据达人Lv4
发表于2022-2-23 19:02
楼主
一、更改插件路径根据补丁路径将文件新增或替换至war包内。
此补丁将linux系统环境解压phantomjs路径变更为javatemp路径。示例:测试环境路径为/usr/local/tomcat/temp/screenshot/phantomjs。
二、映射
docker容器部署 需要将外部abi工作路径和容器内部工作路做映射,如下图:
三、问题解决
启动环境后执行导出pdf出现报错:
/usr/local/tomcat/temp/screenshot/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory。
进入容器/usr/local/tomcat/temp/screenshot目录,执行./phantomjs -v出现:
解决:
将容器内部phantomjs路径加入profile文件。
执行vim /etc/profile命令行。
保存后再进入容器内执行./phantomjs -v
此补丁将linux系统环境解压phantomjs路径变更为javatemp路径。示例:测试环境路径为/usr/local/tomcat/temp/screenshot/phantomjs。
二、映射
docker容器部署 需要将外部abi工作路径和容器内部工作路做映射,如下图:

三、问题解决
启动环境后执行导出pdf出现报错:
/usr/local/tomcat/temp/screenshot/phantomjs: error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory。
进入容器/usr/local/tomcat/temp/screenshot目录,执行./phantomjs -v出现:

解决:
将容器内部phantomjs路径加入profile文件。
执行vim /etc/profile命令行。

保存后再进入容器内执行./phantomjs -v

参考:
此时先去工作目录下的srceenshot/
然后执行命令./phantomjs -v
如果出现错误信息:
error while loading shared libraries: libfontconfig.so.1: cannot open shared object file: No such file or directory
则执行命令 sudo yum install fontconfig freetype2
//yum install fontconfig freetype
//yum install fontconfig-devel
最后再检查./phantomjs -v 是否正常执行。
若导出没有中文,请自行上传jdk字体包。