Can somebody explain to me why I get a
unsatisfiable constraints:
pdftk (missing):
required by: world[pdftk]
error when running
apk update
apk add pdftk
in my alpine docker-image, although it seems to be included in alpine?
Best regards
It seems there is no local cache of alpine repositories inside your docker image.
So, in order to fix this you can do the following:
1. Use --no-cache
flag when you do apk add
to not use any local cache path:
$ docker run -ti alpine:3.7
/ # apk add --no-cache pdftk
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
(1/5) Installing libgcc (6.4.0-r5)
(2/5) Installing gmp (6.1.2-r1)
(3/5) Installing libstdc++ (6.4.0-r5)
(4/5) Installing libgcj (6.4.0-r5)
(5/5) Installing pdftk (2.02-r1)
Executing busybox-1.27.2-r7.trigger
OK: 76 MiB in 16 packages
2. Update local cache first (apk update
) and then install necessary packages (apk add <package>
):
$ docker run -ti alpine:3.7
/ # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-159-g08fa87dac2 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-160-g82f356f8c4 [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]
OK: 9050 distinct packages available
/ # apk add pdftk
(1/5) Installing libgcc (6.4.0-r5)
(2/5) Installing gmp (6.1.2-r1)
(3/5) Installing libstdc++ (6.4.0-r5)
(4/5) Installing libgcj (6.4.0-r5)
(5/5) Installing pdftk (2.02-r1)
Executing busybox-1.27.2-r7.trigger
OK: 76 MiB in 16 packages
P.S. Also please remember that pdftk
package was added to alpine repositories starting from version 3.5. It could be the case you are using alpine:3.4
as a base docker image.
P.P.S. pdftk
package is not present from alpine repositories on 3.9.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With