Jaime Roman
Jaime Roman

Reputation: 989

Alpine: unsatisfiable constraints

I am trying to install a package in alpine, in this case I specify 'jasper-dev', but it has happened to me with many others. The output I get in the terminal is:

/ # apk add jasper-dev
ERROR: unsatisfiable constraints:
   jasper-dev (missing):
     required by: world [jasper-dev]

However when I search for the package at https://pkgs.alpinelinux.org/, the package appears. enter image description here

This is my Dockerfile.

FROM python:3.7-alpine
RUN echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/testing" >> /etc/apk/repositories

RUN apk --update --no-cache add py3-numpy py3-pandas@testing \
      build-base \
      openblas-dev \
      unzip \
      wget \
      cmake \
      ca-certificates \
      libjpeg  \
      libjpeg-turbo-dev \
      libpng-dev \
      jasper-dev \
      tiff-dev \
      libwebp-dev \
      clang-dev \
      linux-headers

How can I install this package?

Upvotes: 3

Views: 5020

Answers (1)

Jaime Roman
Jaime Roman

Reputation: 989

I show the version of alpine with cat /etc/alpine-release and see that it is the 3.12.0. Then I search https://pkgs.alpinelinux.org/ for the package jasper-dev in the branch v3.12 and we see that it does not appear. enter image description here

So we look in previous branches and see that it appears in v3.10, so I modify my Dockerfile to add that repo to /etc/apk/repositories with RUN echo 'http: // dl-cdn. alpinelinux.org/alpine/v3.10/main ' >> /etc/apk/repositories. This will install the package by executing the docker build

Upvotes: 4

Related Questions