0
I'm trying to install java 8 SDK in a qemu emulated chrooted environment and I'm running up against the following error
readelf: Error: /proc/self/exe: Failed to read file's magic number
Readelf works when the path is not absolute. The following outputs the correct header.
cd / && readelf -h proc/self/exe
But the following does not
readelf -h /proc/self/exe
Any suggestions or continuing debugging tips? Thanks in advance!
The /proc/self/exe is linked to /bin/ls, why does readelf not follow this symlink, why does using the absolute path matter? As to that second question, it's called in the pre-configuring packages process when installing oracle-java8-installer. I'm guessing it's for getting system information? – Fish11 – 2018-09-06T18:38:29.317
It must be an issue with qemu emulated chrooted environment, in a normal chroot both work. Also the message doesn't say
No such file
. It seems open is successful, but read isn't. Trystrace readelf -h /proc/self/exe
– RalfFriedl – 2018-09-06T18:56:39.020The output of strace says it all!
qemu: Unsupported syscall: 26
. Thank-you so much for your help! – Fish11 – 2018-09-06T19:08:04.630