Alpine Add Package from Edge repository

点点圈 提交于 2019-12-20 10:44:28

问题


If I'm using Alpine 3.8, how can I add a specific package from the Alpine Edge repository? Is this even supported? There is no equivalent of backports, from what I can see.

I want to add the new version of this: https://pkgs.alpinelinux.org/package/edge/community/armhf/librdkafka

And not the older version in the 3.8 repo: https://pkgs.alpinelinux.org/package/v3.8/community/s390x/librdkafka


回答1:


You could specify the exact repo to apk, using the --repository parameter.
In your case:

apk add librdkafka --repository=http://dl-cdn.alpinelinux.org/alpine/edge/main



回答2:


Edge repository may be enabled permanently. Just do the following:

sed -i '/edge/s/^#//' /etc/apk/repositories



回答3:


You can also add the repo:

echo "@testing http://dl-cdn.alpinelinux.org/alpine/edge/main" >> /etc/apk/repositories

and reference it with apk via @testing. Example:

apk add package-name@testing



来源:https://stackoverflow.com/questions/52899227/alpine-add-package-from-edge-repository

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!