"/usr/bin/google-chrome" is not an ELF file

780 views Asked by At

I am going to use ltrace for some applications like chrome but when I use it, I receive the following error message.

"/usr/bin/google-chrome" is not an ELF file

Does anybody know about the solution? I want to know what functions are exactly called by running an application.

Thanks,

2

There are 2 answers

0
Employed Russian On

Does anybody know about the solution?

file -L /usr/bin/google-chrome
/usr/bin/google-chrome: Bourne-Again shell script, ASCII text executable

This tells you that google-chrome is a shell script. If you look inside, you'll see that it eventually invokes a real ELF binary (/opt/google/chrome/chrome on my system).

I want to know what functions are exactly called by running an application.

The ltrace command will not show you that. It will only show you what external functions are getting called.

0
milahu On

fix: explicitly call the bash interpreter

ltrace -f -C bash -e $(which google-chrome) https://httpbin.dev/get

bash -e means: stop the bash script on error

IMO, this is a missing feature in ltrace

strace works with bash scripts

strace -ff google-chrome https://httpbin.dev/get