gpt4 book ai didi

linux - 安装pdftk alpine linux时出现不可满足的约束错误

转载 作者:行者123 更新时间:2023-12-05 02:44:09 35 4
gpt4 key购买 nike

当尝试安装 pdftk apk 时抛出此错误。

ERROR: unsatisfiable constraints:
pdftk (missing):
required by: world[pdftk]

这里是整个输出:

/opt/app # apk add pdftk
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.9/community/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
ERROR: unsatisfiable constraints:
pdftk (missing):
required by: world[pdftk]

我是 apk 的新手,不确定问题的含义或解决方法。

最佳答案

我只是像在 debian 上使用 pdftk 的 java 端口安装它一样。工作正常。

apk add openjdk8
wget https://gitlab.com/pdftk-java/pdftk/-/jobs/924565145/artifacts/raw/build/libs/pdftk-all.jar
mv pdftk-all.jar pdftk.jar

创建一个名为 pdftk 的文件

$ 纳米 pdftk

    #!/usr/bin/env bash
java -jar "$0.jar" "$@"

更新文件权限并移动到bin目录

chmod 775 pdftk*
mv pdftk* /usr/local/bin

然后使用 pdftk -version 进行测试,您应该会看到类似于以下内容的输出:

pdftk port to java 3.2.2 a Handy Tool for Manipulating PDF Documents
Copyright (c) 2017-2018 Marc Vinyals - https://gitlab.com/pdftk-java/pdftk
Copyright (c) 2003-2013 Steward and Lee, LLC.
pdftk includes a modified version of the iText library.
Copyright (c) 1999-2009 Bruno Lowagie, Paulo Soares, et al.
This is free software; see the source code for copying conditions. There is
NO warranty, not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

请注意,pdftk java url 可能会更改。在此处获取最新消息:https://gitlab.com/pdftk-java/pdftk#pre-built-binaries

我也在 alpine git 上发布了我的答案:https://gitlab.alpinelinux.org/alpine/aports/-/issues/10136

关于linux - 安装pdftk alpine linux时出现不可满足的约束错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/66553937/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com