How to fix chroot return “Exec format error”

Posted In System - By Tum. On Tuesday, February 11th, 2014 With 0 Comments

bash
ปัญหาการรันคำสั่ง chroot แล้วได้รับ error “Exec format error” ในขณะที่เข้าโหมด rescue บน Red Hat/ CentOS โดยมีข้อความ error แบบด้านล่าง


สาเหตุเกิดจากคำสั่งที่รันอยู่ไม่ได้เป็นคำสั่งที่ถูก compile มาจาก architecture อื่น โดยทั่วไปแล้ว error นี้เกิดขึ้นเมื่อคุณ boot ระบบบน 32 bit แต่พยายามจะรันคำสั่งที่ถูก compile มาจาก 64 bit

การแก้ไขให้ตรวจสอบดูว่า environment ที่ทำงานกับคำสั่งที่จะรันอยู่บน architecture เดียวกันหรือไม่

Tags:

Leave a comment

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">

*