0

For the record, I have spent nearly 6 hours today working on this. I've exhausted Google and other similar questions on Stack Overflow/Superuser and other various mailing lists.

I'm trying to run the following application:

# file ./ncsvc
./ncsvc: setuid setgid ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.2.5, stripped

# ls -la ncsvc
-rws--s--x 1 root root 1931688 Dec 19 20:41 ncsvc

I'm running a 64-bit version of Ubuntu:

# uname -m
x86_64

Now, with that past us, here's some details on the libraries this application needs:

# readelf -a ./ncsvc | grep interpreter
      [Requesting program interpreter: /lib/ld-linux.so.2]

# readelf -a ./ncsvc | grep NEEDED
 0x00000001 (NEEDED)                     Shared library: [libdl.so.2]
 0x00000001 (NEEDED)                     Shared library: [libz.so.1]
 0x00000001 (NEEDED)                     Shared library: [libpthread.so.0]
 0x00000001 (NEEDED)                     Shared library: [libm.so.6]
 0x00000001 (NEEDED)                     Shared library: [libc.so.6]

This is where I'm getting stuck:

# ls -la /lib/ld-linux.so.2
lrwxrwxrwx 1 root root 32 Dec 19 23:31 /lib/ld-linux.so.2 -> /lib/x86_64-linux-gnu/ld-2.15.so

# locate libdl.so.2
/lib/i386-linux-gnu/libdl.so.2
/lib/x86_64-linux-gnu/libdl.so.2

# locate libz.so.1
/lib/i386-linux-gnu/libz.so.1
/lib/i386-linux-gnu/libz.so.1.2.3.4
/lib/x86_64-linux-gnu/libz.so.1
/lib/x86_64-linux-gnu/libz.so.1.2.3.4

# locate libpthread.so.0
/lib/i386-linux-gnu/libpthread.so.0
/lib/x86_64-linux-gnu/libpthread.so.0

# locate libm.so.6
/lib/i386-linux-gnu/libm.so.6
/lib/x86_64-linux-gnu/libm.so.6

# locate libc.so.6
/lib/i386-linux-gnu/libc.so.6
/lib/x86_64-linux-gnu/libc.so.6

As far as I can tell, I have the dynamic linker and all of the shared libraries it needs to run (tl;dr: ia32-libs IS installed). Except when I run it, I get this error.

# ./ncsvc
bash: ./ncsvc: cannot execute binary file

Lastly, I'm not sure if this means anything helpful.

# ldd -v ./ncsvc
        not a dynamic executable
  • do you have access to the source code? Just rebuild it... – MattDMo Dec 20 '13 at 5:07
  • If it wasn't clear before, let me spell it out. I don't have access to the source. It's proprietary and the owner (Juniper) has not released a 64-bit version. Other people seem to have gotten it to work on 64-bit environments without issue however. – Chris Olin Dec 20 '13 at 5:16
0

The kernel was not complied with 32-bit emulation support. Rebooting and choosing a kernel with it complied resolved this issue.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.