问题
I appear to be missing something when attempting to install Firefox from the Alpine Edge Repository
Firefox (Version 61.0.1-r0) Repo
as distinct from installing
Firefox-ESR (Version 52.8.1-r0) Repo
I perform the necessary repository modification as documented here which causes my repository to look like:
http://dl-cdn.alpinelinux.org/alpine/edge/main
http://dl-cdn.alpinelinux.org/alpine/edge/community
Following up with:
apk upgrade --update-cache --available
Works fine and does all the necessary pulls. However, when attempting:
apk add --no-cache firefox
Returns
ERROR: unsatisfiable constraints: firefox (missing): required by: world[firefox]
Which is what I would expect from the non-edge repositories. I'm sure I'm missing something simple and obvious. Suggestions?
回答1:
For people who are stumbling upon this question, the 1 line answer is
apk --no-cache add --repository http://dl-cdn.alpinelinux.org/alpine/edge/testing firefox
This will create a single 1-time install of firefox using the test repo of the edge branch.
In order to figure out the right link, navigate to the APK package mirror. and put in a search for Firefox. The branch and repository will be populated and your dockerfiles can be updated accordingly.
Editing of the /etc/apk/repositories
file will also achieve the same effect.
回答2:
Try with RUN apk add \ firefox-esr
回答3:
Bah, the apk update line had been commented out in the Dockerfile, working fine against the Edge testing repository now
回答4:
I found that using alpine 3.11 cuased a lot of issues when trying to install firefox. I updated my dockerfile to use 3.12.1 for alpine (i.e. FROM alpine:3.12.1
) and added RUN apk add firefox-esr
. This seemed to solve my issues. Hope this help those who are still having issues.
回答5:
Just append the testing distro to /etc/apk/repositories:
export ALPINE_VERSION=edge
echo "http://dl-cdn.alpinelinux.org/alpine/${ALPINE_VERSION}/testing" >> /etc/apk/repositories
apk add --no-cache firefox
AFAIK you need to use edge, for latest, alpine v3.11 has firefox-esr v68
来源:https://stackoverflow.com/questions/51806403/installation-of-firefox-from-alpine-edge