当前位置:   article > 正文

Docker容器运行java11应用EasyExcel导出报错 libfreetype.so.6共享库

libfreetype.so.6

一、报错信息:

  1. com.alibaba.excel.exception.ExcelGenerateException: java.lang.UnsatisfiedLinkError: /opt/jdk-11.0.18/lib/libfontmanager.so: libfreetype.so.6: cannot open shared object file: No such file or directory
  2. at com.alibaba.excel.write.ExcelBuilderImpl.addContent(ExcelBuilderImpl.java:65)
  3. at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:73)
  4. at com.alibaba.excel.ExcelWriter.write(ExcelWriter.java:50)
  5. at com.alibaba.excel.write.builder.ExcelWriterSheetBuilder.doWrite(ExcelWriterSheetBuilder.java:62)
  6. at com.oaker.web.controller.system.IdapUserController.export(IdapUserController.java:99)

二、在Docker容器安装字体库

yum install fontconfig -y

三、使用正确的Docker镜像

镜像解决中文和freetype.so.6共享库找不到的问题,基于oracle jdk11.0.18

docker pull docker.io/zxstrive/java11:centos7_jdk-11.0.18

仓库链接: Docker

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Monodyee/article/detail/195485
推荐阅读
相关标签
  

闽ICP备14008679号