ustclug / discussions

Issue Tracker for USTC LUG
47 stars 4 forks source link

某些平台下,alpine 安装出错 ERROR: c-ares-1.24.0-r0: package mentioned in index not found #441

Closed zw963 closed 9 months ago

zw963 commented 9 months ago

问题描述 / Bug description

RUN sed -i "s/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g" /etc/apk/repositories

RUN --mount=type=cache,target=/var/cache/apk \
    set -ux; \
    apk add \
    --update \
    git \
    g++ make automake libtool autoconf curl \
    ;

上面的命令在 docker build --platform=linux/arm/v7 情况下失败,提示错误为:

ERROR: c-ares-1.24.0-r0: package mentioned in index not found

改为官方源没有问题。

谢谢。

taoky commented 9 months ago

上一次同步是成功的,时间为 8:02:15 AM,有可能是上游的不一致导致的。现在正在重新同步。

taoky commented 9 months ago

同步完成,测试确认该问题已经解决:

> docker run -it --platform=linux/arm/v7 alpine:3.19
/ # sed -i "s/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g" /etc/apk/repositories
/ # apk add c-ares
fetch https://mirrors.ustc.edu.cn/alpine/v3.19/main/armv7/APKINDEX.tar.gz
fetch https://mirrors.ustc.edu.cn/alpine/v3.19/community/armv7/APKINDEX.tar.gz
(1/1) Installing c-ares (1.24.0-r0)
OK: 5 MiB in 16 packages