NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Getting 32 bit linux binary support



Hello,

When I try to run modload compat_linux32 as root I get the following error:

modload: compat_linux32: Exec format error

however, when I run modstat | grep compat_linux, I get the following:

compat_linux               exec     builtin  -        0       - compat_ossaudio,sysv_ipc,mqueue,compat_util,compat_50,compat_43,exec_elf64,exec_aout

Which it seems like the module for the 64 bit support is loaded fine.

On 2026-09-13 8:39 p.m., Greg Troxel wrote:
Cameron Kelly <cam.k801%gmail.com@localhost> writes:

I have a netbsd 11.0 box and am trying to get 32-bit linux binaries to run.
running amd64 I am guessing.

I've recompiled the kernel to include COMPAT_LINUX, EXEC_ELF64 and
EXEC_ELF32 options and have installed the suse32_base and suse_base
package. I then tried to run a 32bit linux binary but I just get the
following error:

-bash: /emul/linux32/bin/ls: cannot execute binary file: Exec format error

Oddly though, 64 bit support seems to work because when I run
/emul/linux/bin/ls, it runs it no problem.
It may help to `modload compat_linux32`.   See the man pages
   compt_linux(8)
   modstat(8)
   modload(8)
   modules.conf(5)

the last one is needed if your kernel does not allow module loading
after raising seurelevel.


Home | Main Index | Thread Index | Old Index