Chrooting returns exec format error的合理解释

Knowledge Base:Chrooting returns exec format error

Synopsis

During the installation of Gentoo Linux, attempting to chroot into the new environment breaks with the following error:

root # chroot /mnt/gentoo /bin/bash
chroot: failed to run command `/bin/bash': Exec format error

Environment

This article applies to Gentoo Linux installations on an x86_64 platform (amd64 architecture).

Analysis

The error Exec format error means that the binary being executed is made for a different architecture than the environment currently booted. It usually occurs when the system has been booted on a 32-bit system when a 64-bit environment is trying to load.

Resolution

Reboot the live environment and choose the correct architecture (most LiveCDs support a 64-bit kernel as well as a 32-bit option, although it is not booted by default). Look for entries labeled gentoo64 or linux64 if trying to boot a 64-bit system.

https://wiki.gentoo.org/wiki/Knowledge_Base:Chrooting_returns_exec_format_error


原因就是架构不同,32位与64位架构差别 或者arm与x86架构差别

  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值