You needd to add :
/usr/local/opt/binutils/bin
The path /usr/local/opt/binutils/bin should be added to your PATH environment variable.
You probably didn't notice the output from brew install binutils:
binutils is keg-only, which means it was not symlinked into /usr/local, because Apple's CLT provides the same tools.
If you need to have binutils first in your PATH, run: echo 'export PATH="/usr/local/opt/binutils/bin:$PATH"' >> /Users/ipellegrini/.bash_profile
For compilers to find binutils you may need to set: export LDFLAGS="-L/usr/local/opt/binutils/lib" export CPPFLAGS="-I/usr/local/opt/binutils/include"
So should be enough to:
- โคต๏ธ
runecho 'export PATH="/usr/local/opt/binutils/bin:$PATH"' >> ~/.bash_profilein order to add thebinfolder toPATH, automatically, every time you open a new command-line shell. - ๐
close the current shell and open a new one, for triggering the.bash_profileand making the command available for use. - ๐
runwhich readelfto ensure that your desired command is found & reachable
Enjoy ๐
To avoid conflicts with the utilities distributed by Apple, the binutils executables installed by Homebrew all have "g" prefixed to their names (so, for instance, objdump becomes gobjdump).
you need to update your $PATH to include the homebrew install location. you probably want to look at other places people have asked this question like:
https://superuser.com/questions/324616/how-should-i-set-the-path-variable-on-my-mac-so-the-hombrew-installed-tools-are