FROM alpine
# 安装运行环境
RUN apk add libgcc libstdc++ libx11 glib libxrender libxext libintl libcrypto1.0 libssl1.0 ttf-freefont fontconfig
# wkhtmltopdf
COPY wkhtmltox /bin/
RUN chmod +x /bin/wkhtmltopdf
# 安装字体
RUN mkdir -p /usr/share/fonts/chinese/TrueType/
RUN cp simsun.ttc /usr/share/fonts/chinese/TrueType/
RUN cp simsun.ttf /usr/share/fonts/chinese/TrueType/
# 其他操作
描述: libcrypto1.0 libssl1.0 安装时候提示missing缺失:
原因: 在apline镜像版本3.9之后被移除,改为libcrypto1.1 libssl1.1
解决方案: 从其他仓库中拉取
apk add libssl1.0 --update-cache --repository http://mirrors.ustc.edu.cn/alpine/v3.8/main/ --allow-untrusted && \
libcrypto1.0 会随着libssl1.0的安装而安装
备注:wkhtmltopdf使用的时候会自动检索1.0版本的libssl, 安装其他版本调用wkhtmltopdf的时候会报错, 报错信息如下:
OSError: wkhtmltopdf reported an error:
Error loading shared library libssl.so.1.0.0: No such file or directory (needed by /bin/wkhtmltopdf)
Error loading shared library libcrypto.so.1.0.0: No such file or directory (needed by /bin/wkhtmltopdf)
Error relocating /bin/wkhtmltopdf: X509_STORE_CTX_get_chain: symbol not found
Error relocating /bin/wkhtmltopdf: EVP_PKEY_set1_DSA: symbol not found
Error relocating /bin/wkhtmltopdf: SSLeay: symbol not found
Error relocating /bin/wkhtmltopdf: ASN1_STRING_length: symbol not found
Error relocating /bin/wkhtmltopdf: BIO_read: symbol not found
Error relocating /bin/wkhtmltopdf: X509_get_issuer_name: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_get_current_cipher: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_get_verify_result: symbol not found
Error relocating /bin/wkhtmltopdf: BIO_ctrl: symbol not found
Error relocating /bin/wkhtmltopdf: OPENSSL_add_all_algorithms_conf: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_CTX_use_PrivateKey: symbol not found
Error relocating /bin/wkhtmltopdf: X509_get_ext: symbol not found
Error relocating /bin/wkhtmltopdf: X509_NAME_ENTRY_get_data: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_CTX_ctrl: symbol not found
Error relocating /bin/wkhtmltopdf: X509_STORE_CTX_new: symbol not found
Error relocating /bin/wkhtmltopdf: ASN1_INTEGER_get: symbol not found
Error relocating /bin/wkhtmltopdf: X509_cmp: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_CTX_set_cipher_list: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_CTX_load_verify_locations: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_CTX_use_RSAPrivateKey: symbol not found
Error relocating /bin/wkhtmltopdf: sk_pop_free: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_CTX_use_certificate: symbol not found
Error relocating /bin/wkhtmltopdf: X509_STORE_CTX_get_error: symbol not found
Error relocating /bin/wkhtmltopdf: SSLv23_client_method: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_read: symbol not found
Error relocating /bin/wkhtmltopdf: X509_NAME_entry_count: symbol not found
Error relocating /bin/wkhtmltopdf: EVP_PKEY_new: symbol not found
Error relocating /bin/wkhtmltopdf: EVP_PKEY_assign: symbol not found
Error relocating /bin/wkhtmltopdf: PEM_write_bio_DSA_PUBKEY: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_load_error_strings: symbol not found
Error relocating /bin/wkhtmltopdf: RAND_status: symbol not found
Error relocating /bin/wkhtmltopdf: SSL_connect: symbol not found
Error relocating /bin/wkhtmltopdf: SSLv3_server_method: symbol not found
Error relocating /bin/wkhtmltopdf: EVP_PKEY_get1_DSA: symbol not found
Error relocating /bin/wkhtmltopdf: X509_get_subject_name: symbol not found
Error relocating /bin/wkhtmltopdf: TLSv1_server_method: symbol not found
Error relocating /bin/wkhtmltopdf: X509_STORE_new: symbol not found
.......
安装方法截止2019.08wkhtmltopdf 还没有alpine 的版本 如需使用 需要在alpine 环境中编译 生成 wkhtmltopdf (使用 apk add wkhtmltopdf 运行报错)编辑可参考https://github.com/ElfoLiNk/alpine-java-wkhtmltopdf也可以从elfolink/alpine-java-wkhtmltopdf 镜像中将生成好的wkhtmltopdf 拷贝出来 放入自己的dockerfile...
docker-wkhtmltopdf
此存储库包含用于创建docker映像的脚本,该脚本将有多种变体。
目的是发布带有可用补丁程序的wkhtmltopdf安装程序的docker映像,并在提供所有功能时使其尽可能小。
发布的图像遵循命名约定。
图像名称遵循以下格式:
surnet/<os>-<base>-wkhtmltopdf或surnet/<os>-wkhtmltopdf
<os>与底层os匹配。
<base>与使用的基本图像匹配。
如果os和基础图像相同,则<os>与使用的基础图像匹配。
例如surnet/alpine-node-wkhtmltopdf或surnet/alpine-wkhtmltopdf
标签代表遵循以下格式的版本号:
<1>-<2>-<3>
<1>与基本映像的版本匹配。
<2>与wkhtmltopdf版本匹配
func main() {
c := wkhtmltoimage.ImageOptions{Input: "http://example.com", Format: "png"}
out, _ := wkhtmltoimage.GenerateImage(&c)
f, _ := os.Create("/tmp/ex
Python OSError: wkhtmltopdf reported an error:Exit with code 1 due to network error:ProtocolUnknownE
示例的测试代码均在 Windows10 的 Linux子系统 中进行;
原文档地址:https://wkhtmltopdf.org/usage/wkhtmltopdf.txt
版本名称: wkhtmltopdf 0.12.6 (with patched qt)
wkhtmltopdf patched qt 是将一个或多个HTML页面合并为一个PDF文档的应用程序。
wkhtmltopdf [GLOBAL OPTION]... [OBJ
我的操作系统是 CentOS 7 所以选择图中版本
然后把rpm文件传输到linux,在rpm文件目录使用rpm安装:rpm -ivh wkhtmltopdf的rpm文件名称
安装依赖:yum install -y fontconfig libX11 libXext libXrender lib
截止2019.08
wkhtmltopdf 还没有alpine 的版本 如需使用 需要在alpine 环境中编译 生成 wkhtmltopdf (使用 apk add wkhtmltopdf 运行报错)
编辑可参考https://github.com/ElfoLiNk/alpine-java-wkhtmltopdf
也可以从elfolink/alpine-java-wkhtml...
Mac OS X 10.11.6, curl 命令报错,错误如下:
dyld: lazy symbol binding failed: Symbol not found: _SSL_load_error_strings
Referenced from: /usr/local/lib/libcurl.4.dylib
Expected in: flat namesp...
今天编软件的时候出现libcrypto.so.1.0.0找不到的问题,百度了一堆解决方法,出现了各种问题,现在将我解决的过程记录下来,希望之后遇到这种问题能能快速找到解决办法。
libcrypto.so.1.0.0这个库是包含在libssl1.0.0中的,所以安装libssl1.0.0就行了,ubuntu中直接用命令安装:
sudo apt-get install libssl1.0.0
我的ubu
Alpine以它的小巧和实用深受总多开发者的喜爱,而提到Alpine的Linux,其包管理工具apk则是在Alpine中使用广泛的一个工具,这篇文章简要介绍一下常见的使用方式。
什么是apk
Alpine Linux的包管理工具主要包含两部分内容:
包管理:提供安装/更新/删除包的功能
系统备份恢复:将系统恢复至之前安装和配置的备份状态
而具体实现上述两部分功能的工具则是apk和lbu
这篇文章主要介绍包管理工具apk的使用方法。常见命令的使用说明如下所示:
在本文接下来的内容中将就..