当前位置: 首页 > article >正文

CodiMD导出pdf失败或无中文

CodiMD导出pdf失败,弹出文件保存窗口,有个pdf文件能下载,但是保存的时候提示“网站出问题了”,实际到服务器上看会发现docker崩溃了。
解决办法:

  1. 使用最新的CodiMD镜像,如nabo.codimd.dev/hackmdio/hackmd:2.5.4
    如果是导出pdf没有中文,可能使用的较老的镜像,如2.4.2以前的,里面没有中文字体支持。

  2. docker-compose.yml里面配置如下参数:

    environment:
      #for pdf export
      - CMD_ALLOW_PDF_EXPORT=true
      - QT_QPA_PLATFORM=
      - OPENSSL_CONF=/etc/ssl

否则会提示DSO support routines:DLFCN_LOAD:
DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory

或者phantomjs错误

2024-03-24T14:42:45.731Z error:         uncaughtException: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
Auto configuration failed
139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

Error: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
Auto configuration failed
139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

    at ChildProcess.exithandler (node:child_process:402:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5)
2024-03-24T14:42:45.731Z error:         An uncaught exception has occured.
2024-03-24T14:42:45.731Z error:         Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
Auto configuration failed
139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

2024-03-24T14:42:45.734Z error:         Process will exit now.
Error: Command failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000
Auto configuration failed
139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory
139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:
139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf
139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf

    at ChildProcess.exithandler (node:child_process:402:12)
    at ChildProcess.emit (node:events:513:28)
    at maybeClose (node:internal/child_process:1100:16)
    at Process.ChildProcess._handle.onexit (node:internal/child_process:304:5) {
  code: 1,
  killed: false,
  signal: null,
  cmd: '/home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000',
  level: 'error',
  timestamp: '2024-03-24T14:42:45.731Z',
  [Symbol(level)]: 'error',
  [Symbol(message)]: '2024-03-24T14:42:45.731Z error: \tCommand failed: /home/hackmd/app/node_modules/phantomjs-prebuilt/lib/phantom/bin/phantomjs /home/hackmd/app/node_modules/markdown-pdf/phantom/render.js /tmp/tmp-35zfQ8i6i7t56J.html /tmp/tmp-35TT7Us019ho1a.pdf /home/hackmd/app /home/hackmd/app/node_modules/markdown-pdf/runnings.js /home/hackmd/app/node_modules/markdown-pdf/css/pdf.css /home/hackmd/app/node_modules/highlight.js/styles/github-gist.css A4 portrait 2cm 0 10000\n' +
    'Auto configuration failed\n' +
    '139809934388864:error:25066067:DSO support routines:DLFCN_LOAD:could not load the shared library:dso_dlfcn.c:185:filename(libssl_conf.so): libssl_conf.so: cannot open shared object file: No such file or directory\n' +
    '139809934388864:error:25070067:DSO support routines:DSO_load:could not load the shared library:dso_lib.c:244:\n' +
    '139809934388864:error:0E07506E:configuration file routines:MODULE_LOAD_DSO:error loading dso:conf_mod.c:285:module=ssl_conf, path=ssl_conf\n' +
    '139809934388864:error:0E076071:configuration file routines:MODULE_RUN:unknown module name:conf_mod.c:222:module=ssl_conf\n'
}

http://www.kler.cn/a/407166.html

相关文章:

  • UVM 验证方法学之interface学习系列文章(七)高级 《bind 操作》(4)级联
  • key-value存储实现
  • GPTZero:高效识别AI生成文本,保障学术诚信与内容原创性
  • C#桌面应用制作计算器进阶版01
  • java实现小程序接口返回Base64图片
  • 大模型呼入机器人系统如何建设?
  • MySQL 中的锁
  • PHP实现插入排序
  • 解决 Docker Desktop 启动报错:Docker Desktop is unable to detect a Hypervisor
  • gpt2的学习
  • LVM缩容
  • Chrome DevTools Protocol 进阶:DOM 域
  • 开放性实验——网络安全渗透测试
  • Flutter实现气泡提示框学习
  • 设计模式-创建型-抽象工厂模式
  • Android kotlin之配置kapt编译器插件
  • 微信小程序数据绑定与事件绑定详解:从入门到精通
  • Unity UI射线检测 道具拖拽
  • 网络安全与加密
  • Spring Boot 整合 Prometheus 实现资源监控
  • 全面提升系统安全:禁用不必要服务、更新安全补丁、配置防火墙规则的实战指南
  • 鸿蒙开发-音视频
  • AI赋能 Python编程之2. 从构思到优化:用AI快速实现Python项目
  • 【多线程-第一天-多线程的执行原理-多线程的优缺点-主线程 Objective-C语言】
  • Arcpy 多线程批量重采样脚本
  • 11 —— 打包模式的应用