armhf 交叉编译存储库是否已被删除?

armhf 交叉编译存储库是否已被删除?

ubuntu 好像忘记了 armhf 软件包?我是不是漏掉了什么?

可以使用这个简单的 Dockerfile 重现该问题:

    FROM ubuntu
    USER root
    RUN dpkg --add-architecture armhf
    RUN apt-get update

但显然 ubuntu 存储库不知道这一点?

    E: Failed to fetch http://security.ubuntu.com/ubuntu/dists/xenial-security/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.152 80]
    E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
    E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-updates/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
    E: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/xenial-backports/main/binary-armhf/Packages  404  Not Found [IP: 91.189.88.161 80]
    E: Some index files failed to download. They have been ignored, or old ones used instead.

非常感谢您的帮助

答案1

谢谢!经过一番挖掘,我意识到我们需要修补 sources.list 以包含端口

    FROM ubuntu
    USER root
    RUN sed -i "s/^deb /deb \[arch=$(dpkg --print-architecture)] /" /etc/apt/sources.list
    RUN for SUFFIX in "" "-updates" "-security"; do \
      echo "deb [arch=armhf] http://ports.ubuntu.com/ubuntu-ports/ xenial${SUFFIX} main restricted universe multiverse" \
      >> /etc/apt/sources.list.d/armhf.list; \
    done
    RUN dpkg --add-architecture armhf
    RUN apt-get update

请注意,我不太清楚该脚本的来源。

相关内容