0

I am trying to install megatools on an Alpine Linux container in Docker. This package is flagged because a new version is available.

How can I force apk to install this package despite the flag? I tried specifying the version explictely, but it always fail.

Without specifying the version explicitely:

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

With the version:

/ # apk add megatools=1.9.98-r3
ERROR: unsatisfiable constraints:
  megatools (missing):
    required by: world[megatools=1.9.98-r3]

All of this happens in stock alpine:latest Docker image.

Package page on the Alpine repo browser is here: https://pkgs.alpinelinux.org/package/edge/testing/x86_64/megatools

1

I'm not sure about the package flags (I'm not familiar to package flagging with apk), but it seems to be a matter of missing repositories.

The megatools package is found in the edge/testing repository, which you're currently missing (note the Branch and Repository fields in the package description page, also indicated in the URL).

You'll also need the edge/main repository, for satisfying the libcrypto dependency.

In summary:

echo http://dl-cdn.alpinelinux.org/alpine/edge/main >> /etc/apk/repositories
echo http://dl-cdn.alpinelinux.org/alpine/edge/testing >> /etc/apk/repositories
apk update
apk add megatools

Note that edge contains the latest development packages, and are not official stable versions, so use them with care. This is especially true for testing packages.

More on the edge repository: https://wiki.alpinelinux.org/wiki/Edge

| improve this answer | |
  • Thank you for your answer. I tried your method in a Dokcer container and I was able to install megatools. However in the end I used another solution (I use megatools in a Gitlab CI, and I just commited the megatools exe in the repo's tool directory). – Nathan.Eilisha Shiraini Jan 28 '19 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.