使用 aliyun 的 debian 镜像的时候,遇到 404 IP 问题
我的用法
FROM registry-vpc.cn-hangzhou.aliyuncs.com/vobile-infra/python:3.11-bookworm
RUN sed -i 's/deb.debian.org/mirrors.aliyun.com/g' /etc/apt/sources.list.d/debian.sources
RUN apt update
# debian11 以及下
# RUN apt install -y vim netcat telnet less
# debian12 的 netcat 变成 netcat-openbsd 了,详见: https://unix.stackexchange.com/questions/749306/discrepancies-in-netcat-installation-process-between-debian-bullseye-vs-debian-b
RUN apt install -y vim netcat-openbsd telnet less iputils-ping
RUN apt install -y netcat-openbsd htop sysstat
RUN apt install -y ncdu
RUN apt install -y libjemalloc-dev
RUN /usr/local/bin/python -m pip install --upgrade pip -i https://mirror.baidu.com/pypi/simple
我执行的命令
apt install wrk -y
我遇到的问题
root@crawler-console-api-long-server-prod-59f877944b-5lf2c:/code# apt install wrk -y
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following additional packages will be installed:
libluajit-5.1-2 libluajit-5.1-common
The following NEW packages will be installed:
libluajit-5.1-2 libluajit-5.1-common wrk
0 upgraded, 3 newly installed, 0 to remove and 120 not upgraded.
Need to get 352 kB of archives.
After this operation, 943 kB of additional disk space will be used.
Err:1 http://mirrors.cloud.aliyuncs.com/debian bookworm/main amd64 libluajit-5.1-common all 2.1.0~beta3+git20220320+dfsg-4.1
404 Not Found [IP: 100.100.2.148 80]
Err:2 http://mirrors.cloud.aliyuncs.com/debian bookworm/main amd64 libluajit-5.1-2 amd64 2.1.0~beta3+git20220320+dfsg-4.1
404 Not Found [IP: 100.100.2.148 80]
Get:3 http://mirrors.cloud.aliyuncs.com/debian bookworm/main amd64 wrk amd64 4.1.0-3+b2 [43.3 kB]
Fetched 43.3 kB in 0s (223 kB/s)
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/debian/pool/main/l/luajit/libluajit-5.1-common_2.1.0%7ebeta3%2bgit20220320%2bdfsg-4.1_all.deb 404 Not Found [IP: 100.100.2.148 80]
E: Failed to fetch http://mirrors.cloud.aliyuncs.com/debian/pool/main/l/luajit/libluajit-5.1-2_2.1.0%7ebeta3%2bgit20220320%2bdfsg-4.1_amd64.deb 404 Not Found [IP: 100.100.2.148 80]
E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
怎么解决这个问题?执行一下 apt update 命令就好了