软路由openwrt X86内核不支持binfmt导致No binfmt support in the kernel错误

2022-09-30
0评论
/
阅读
爱搜啊

如果使用的openwrt固件内核不支持binfmt的话,跨平台运行 docker 镜像的时候就会报错,由于binfmt是一个内核功能,如果现在使用的openwrt固件的话,只能重新编译openwrt固件打开内核对binfmt的支持才行。

在某些使用场景如跨平台运行 docker 镜像的时候,会提示不支持,使用如下命令时

# docker run --rm --privileged multiarch/qemu-user-static --reset -p yes

会报错

No binfmt support in the kernel.

Try: '/sbin/modprobe binfmt_misc' from the host

只需要在编译 openwrt 时打开内核对 binfmt 的支持就可以的

$ make kernel_menuconfig

编译openwrt时打开内核对 binfmt 的支持

找到 Executable file formats,然后勾选上 Kernel support for MISC binaries,再编译固件即可。

No binfmt support in the kernel错误

No binfmt support in the kernel错误


本站附件分享,如果附件失效,可以去找找看

诚通网盘附件百度网盘附件


标签: binfmt openwrt
于2022-09-30发布