I want to use GNU binutils to inspect an executable on MacOS 12.1. I did a
% brew install binutils
and it seemed to go fine. First I tried just a
% readelf <executable>
but was given:
zsh: command not found: readelf
Then I tried checking on binutils itself:
% binutils -v
which gave me
zsh: command not found: binutils
I tried adding both
/usr/local/opt/binutils
and
/usr/local/Cellar/binutils
to my $PATH and restarting zsh. The filepaths were in my $PATH, and homebrew had put 'binutils' in the expected locations. But
% binutils -v
still gives me
zsh: command not found: binutils
. Has anyone gotten binutils to work on Mac? What am I missing?
CodePudding user response:
You needd to add :
/usr/local/opt/binutils/bin
CodePudding user response:
Check if Xcode is installed or not:
$ gcc --version
$ ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install.sh)"
$ brew doctor
$ brew update
