我得到了一个包含旧版本 apk 及其存储库的 docker 镜像。因此我运行以下命令来升级它。几天前它还可以正常工作。但今天,它停止工作了。
docker run -it openjdk:alpine sh
#### In the container shell
# cat > /etc/apk/repositories <<EOT
> http://nl.alpinelinux.org/alpine/v3.16/main
> http://nl.alpinelinux.org/alpine/v3.16/community
> EOT
# apk add -X https://alpine.global.ssl.fastly.net/alpine/v3.16/community -u alpine-keys --allow-untrusted
fetch https://alpine.global.ssl.fastly.net/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
OK: 410 MiB in 66 packages
# apk update --no-cache --update-cache
fetch http://nl.alpinelinux.org/alpine/v3.16/main/aarch64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/v3.16/community/aarch64/APKINDEX.tar.gz
v20220328-1848-g32db30a6f0 [http://nl.alpinelinux.org/alpine/v3.16/main]
v3.16.1-123-g8df8eb3436 [http://nl.alpinelinux.org/alpine/v3.16/community]
OK: 16889 distinct packages available
# apk upgrade
Upgrading critical system libraries and apk-tools:
(1/4) Upgrading musl (1.1.19-r10 -> 1.2.3-r0)
(2/4) Installing ca-certificates-bundle (20211220-r0)
ERROR: ca-certificates-bundle-20211220-r0: package mentioned in index not found (try 'apk update')
(3/4) Upgrading apk-tools (2.10.0-r0 -> 2.12.9-r2)
ERROR: apk-tools-2.12.9-r2: package mentioned in index not found (try 'apk update')
(4/4) Upgrading musl-utils (1.1.19-r10 -> 1.2.3-r0)
Executing busybox-1.35.0-r17.trigger
Continuing the upgrade transaction with new apk-tools:
(1/29) Installing alpine-baselayout-data (3.2.0-r20)
ERROR: alpine-baselayout-data-3.2.0-r20: package mentioned in index not found (try 'apk update')
(2/29) Upgrading alpine-baselayout (3.1.0-r0 -> 3.2.0-r20)
ERROR: alpine-baselayout-3.2.0-r20: package mentioned in index not found (try 'apk update')
After that, I can't run `apk` command any more. Always got following errors:
```bash
/ # apk
Error loading shared library libssl.so.45: No such file or directory (needed by /sbin/apk)
Error loading shared library libcrypto.so.43: No such file or directory (needed by /sbin/apk)
Error relocating /sbin/apk: X509_LOOKUP_file: symbol not found
Error relocating /sbin/apk: SSL_get_error: symbol not found
Error relocating /sbin/apk: BIO_new_fp: symbol not found
Error relocating /sbin/apk: X509_check_host: symbol not found