pcmeasure on 64bit systems OR “The -bash: No such file or directory problem”
22. October 2009 von mirko
Today I tried to install pcmeasure on a 64bit Linux Ubuntu server. But, when I tried to run it, the following happened:
bash: ./pcmeasure: No such file or directory
So why the pcmeasure program wasn’t finding theese programs, if they were really there?
Ok, let’s try the next step – strace:
strace /root/pcmeasure
execve("/root/pcmeasure", ["/root/pcmeasure"], [/* 18 vars */]) = -1 ENOENT (No such file or directory)
dup(2) = 3
fcntl(3, F_GETFL) = 0x8002 (flags O_RDWR|O_LARGEFILE)
fstat(3, {st_mode=S_IFCHR|0600, st_rdev=makedev(136, 0), ...}) = 0
mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x7fbdeefb9000
lseek(3, 0, SEEK_CUR) = -1 ESPIPE (Illegal seek)
write(3, "strace: exec: No such file or di"..., 40strace: exec: No such file or directory
) = 40
close(3) = 0
munmap(0x7fbdeefb9000, 4096) = 0
exit_group(1) = ?
Process 7569 detached
Take a look at the first line. Execve was called by strace itself and, again, the “No such file or directory” error is there!
One begins to wonder what kind of program pcmeasure really is… this is what a hex dump of its beginning look like:
xxd pcmeasure | less
0000000: 7f45 4c46 0101 0100 0000 0000 0000 0000 .ELF............
0000010: 0200 0300 0100 0000 b08b 0408 3400 0000 ............4...
0000020: 6c36 0000 0000 0000 3400 2000 0700 2800 l6......4. ...(.
0000030: 2400 2100 0600 0000 3400 0000 3480 0408 $.!.....4...4...
0000040: 3480 0408 e000 0000 e000 0000 0500 0000 4...............
0000050: 0400 0000 0300 0000 1401 0000 1481 0408 ................
0000060: 1481 0408 1300 0000 1300 0000 0400 0000 ................
0000070: 0100 0000 0100 0000 0000 0000 0080 0408 ................
0000080: 0080 0408 e825 0000 e825 0000 0500 0000 .....%...%......
0000090: 0010 0000 0100 0000 0026 0000 00b6 0408 .........&......
00000a0: 00b6 0408 7005 0000 1896 0100 0600 0000 ....p...........
00000b0: 0010 0000 0200 0000 cc29 0000 ccb9 0408 .........)......
00000c0: ccb9 0408 e000 0000 e000 0000 0600 0000 ................
00000d0: 0400 0000 0400 0000 2801 0000 2881 0408 ........(...(...
00000e0: 2881 0408 2000 0000 2000 0000 0400 0000 (... ... .......
00000f0: 0400 0000 50e5 7464 8425 0000 84a5 0408 ....P.td.%......
0000100: 84a5 0408 6400 0000 6400 0000 0400 0000 ....d...d.......
0000110: 0400 0000 2f6c 6962 2f6c 642d 6c69 6e75 ..../lib/ld-linu
0000120: 782e 736f 2e32 0000 0400 0000 1000 0000 x.so.2..........
0000130: 0100 0000 474e 5500 0000 0000 0200 0000 ....GNU.........
0000140: 0200 0000 0500 0000 2500 0000 2d00 0000 ........%...-...
0000150: 1400 0000 2900 0000 0000 0000 0000 0000 ....)...........
0000160: 0000 0000 1c00 0000 0000 0000 0000 0000 ................
0000170: 2b00 0000 0c00 0000 2800 0000 0800 0000 +.......(.......
0000180: 0000 0000 0000 0000 2400 0000 1a00 0000 ........$.......
0000190: 0b00 0000 0100 0000 2100 0000 2700 0000 ........!...'...
00001a0: 1500 0000 2c00 0000 2000 0000 1800 0000 ....,... .......
00001b0: 0000 0000 0000 0000 0000 0000 0000 0000 ................
00001c0: 0000 0000 1d00 0000 0f00 0000 0000 0000 ................
00001d0: 2a00 0000 1f00 0000 2600 0000 2300 0000 *.......&...#...
It looks like a normal binary… but oho… there seems to be a reference to a file there, which does not exist:
ls /lib/ld-linux.so.2
ls: cannot access /lib/ld-linux.so.2: No such file or directory
Well, now that we know which file does not exist, we can look for the reason why it’s not there. In my case, it is fairly simple: I’m running Ubuntu Server in the 64bit version, and the 32-bit compatibility libraries hadn’t been installed. After installing those libraries pcmeasure started fine.
aptitude install ia32-libs



If you have any questions, suggestions or translation problems feel free to send a message: