最新的MacBook Pro采用了Apple M1 Pro,芯片是arm结构
执行命令会报错
E: Failed to fetch
ERROR: Service 'laravel.test' failed to build : Build failed
在 ARM(arm64, armhf)、PowerPC(ppc64el)、RISC-V(riscv64) 和 S390x 等架构的设备上(对应官方源为ports.ubuntu.com)需要使用 ubuntu-ports 镜像。
所以将将镜像源地址中的中的ubuntu换成ubuntu-ports地址就解决了
如下所示:
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute-updates main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute-updates main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute-backports main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute-backports main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute-security main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute-security main restricted universe multiverse
deb http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute-proposed main restricted universe multiverse
deb-src http://mirrors.tuna.tsinghua.edu.cn/ubuntu-ports/ hirsute-proposed main restricted universe multiverse
亲测ubuntu:21.04有效