ubuntu18.04 更换源后update失败 404

报错日志

E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic/main/binary-arm64/Packages  404  Not Found [IP: 111.164.16.227 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-security/main/binary-arm64/Packages  404  Not Found [IP: 111.164.16.227 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-updates/main/binary-arm64/Packages  404  Not Found [IP: 111.164.16.227 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-proposed/main/binary-arm64/Packages  404  Not Found [IP: 111.164.16.227 80]
E: Failed to fetch http://mirrors.aliyun.com/ubuntu/dists/bionic-backports/main/binary-arm64/Packages  404  Not Found [IP: 111.164.16.227 80]
E: Some index files failed to download. They have been ignored, or old ones used instead.

解决方法

  • 查看系统cpu架构

    root@shuan-FortFirm-H3652:/etc/apt# dpkg --print-architecture
    amd64
    
  • 源中指定上一步输出的系统CPU架构

    cd /etc/apt
    mv sources.list sources.list.bak
    cat > sources.list << EOF
    deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb [arch=amd64] http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-security main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-updates main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-proposed main restricted universe multiverse
    deb-src http://mirrors.aliyun.com/ubuntu/ bionic-backports main restricted universe multiverse
    EOF
    
  • 更新源

    apt-get update
    

你可能感兴趣的:(ubuntu,ubuntu)