Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

First post, but I come here often and this is the first time I haven't found the answer already posted, so I registered.

I have a simple binary executable that runs fine in 10.04.

./buds
Opening serial device '/dev/ttyS0' (19200,8N1)...OK
Creating PTY device...OK
Setting PTY device '/dev/pts/1' (115200,8N1)...OK
Startup complete, waiting for commands...

But does not in 11.10 Live CD or 12.04 under VirtualBox:

cd Test
ls
buds
./buds
bash: ./buds: No such file or directory

I've made sure that buds is executable and that I have permissions:

chris@chris-VirtualBox:~$ ls -l buds

-rwxr-xr-x 1 chris chris 26240 Jun 22 2010 buds

file buds 
buds: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=0xf8f0b93813114695c72203bdc1bcf47163553eab, stripped 

ldd buds
not a dynamic executable 

Yikes!

share|improve this question
    
Please add the output of file buds and ldd buds –  Lekensteyn Apr 30 '12 at 15:51
    
chris@chris-VirtualBox:~$ file buds buds: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.15, BuildID[sha1]=0xf8f0b93813114695c72203bdc1bcf47163553eab, stripped chris@chris-VirtualBox:~$ ldd buds not a dynamic executable –  Chris Apr 30 '12 at 16:42
add comment

1 Answer 1

Looks like that your binary was built for 32-bit systems. Try installing the 32-bit C library:

sudo apt-get install libc6:i386

If it still does not want to run, use ldd to find out the library names. If libx11.so is missing, you probably need a package named like libx11. You can always use http://packages.ubuntu.com/ to find out the package name by searching for file name.

share|improve this answer
    
Right on Lekensteyn. I found this out for myself a few minutes ago and tried the chrooot method with no luck. Your answer worked, the file runs, but now I have "permission denied" when trying to open /dev/ttyS0. –  Chris Apr 30 '12 at 22:46
    
Ok, a simple "sudo ./buds" worked wonders! Thanks Lekensteyn. –  Chris Apr 30 '12 at 22:48
    
Changing the file permissions and/ or groupship of /dev/ttyS0 is preferred over running the program as root (unless it really need to do administrative tasks). –  Lekensteyn May 1 '12 at 7:35
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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