zsh - GCC installed but command not found -
zsh - GCC installed but command not found -
i'm new linux , i'm having hard time trying work. uninstalled , installed gcc few times. when run gcc --version
, still says zsh: command not found
.
when go /usr/local/bin
, run ls -l
find multiple versions of gcc
lrwxr-xr-x 1 ps032791 admin 33 jul 2 2014 c++-4.6 -> ../cellar/gcc46/4.6.4/bin/c++-4.6 lrwxr-xr-x 1 ps032791 admin 33 apr 6 11:58 c++-4.7 -> ../cellar/gcc47/4.7.3/bin/c++-4.7 lrwxr-xr-x 1 ps032791 admin 33 apr 6 15:27 c++-4.8 -> ../cellar/gcc/4.8.3_1/bin/c++-4.8 lrwxr-xr-x 1 ps032791 admin 32 apr 6 15:19 cloog -> ../cellar/cloog/0.18.1/bin/cloog lrwxr-xr-x 1 ps032791 admin 33 jul 2 2014 cpp-4.6 -> ../cellar/gcc46/4.6.4/bin/cpp-4.6 lrwxr-xr-x 1 ps032791 admin 33 apr 6 11:58 cpp-4.7 -> ../cellar/gcc47/4.7.3/bin/cpp-4.7 lrwxr-xr-x 1 ps032791 admin 33 apr 6 15:27 cpp-4.8 -> ../cellar/gcc/4.8.3_1/bin/cpp-4.8 lrwxr-xr-x 1 ps032791 admin 28 may 29 2014 erb -> ../cellar/ruby/2.1.2/bin/erb lrwxr-xr-x 1 ps032791 admin 33 jul 2 2014 g++-4.6 -> ../cellar/gcc46/4.6.4/bin/g++-4.6 lrwxr-xr-x 1 ps032791 admin 33 apr 6 11:58 g++-4.7 -> ../cellar/gcc47/4.7.3/bin/g++-4.7 lrwxr-xr-x 1 ps032791 admin 33 apr 6 15:27 g++-4.8 -> ../cellar/gcc/4.8.3_1/bin/g++-4.8 -rw-r--r-- 1 ps032791 admin 0 apr 6 13:23 gcc-4.2 lrwxr-xr-x 1 ps032791 admin 33 jul 2 2014 gcc-4.6 -> ../cellar/gcc46/4.6.4/bin/gcc-4.6 lrwxr-xr-x 1 ps032791 admin 33 apr 6 11:58 gcc-4.7 -> ../cellar/gcc47/4.7.3/bin/gcc-4.7 lrwxr-xr-x 1 ps032791 admin 33 apr 6 15:27 gcc-4.8 -> ../cellar/gcc/4.8.3_1/bin/gcc-4.8 lrwxr-xr-x 1 ps032791 admin 36 apr 6 11:58 gcc-ar-4.7 -> ../cellar/gcc47/4.7.3/bin/gcc-ar-4.7 lrwxr-xr-x 1 ps032791 admin 36 apr 6 15:27 gcc-ar-4.8 -> ../cellar/gcc/4.8.3_1/bin/gcc-ar-4.8 lrwxr-xr-x 1 ps032791 admin 36 apr 6 11:58 gcc-nm-4.7 -> ../cellar/gcc47/4.7.3/bin/gcc-nm-4.7 lrwxr-xr-x 1 ps032791 admin 36 apr 6 15:27 gcc-nm-4.8 -> ../cellar/gcc/4.8.3_1/bin/gcc-nm-4.8 lrwxr-xr-x 1 ps032791 admin 40 apr 6 11:58 gcc-ranlib-4.7 -> ../cellar/gcc47/4.7.3/bin/gcc-ranlib-4.7 lrwxr-xr-x 1 ps032791 admin 40 apr 6 15:27 gcc-ranlib-4.8 -> ../cellar/gcc/4.8.3_1/bin/gcc-ranlib-4.8
i ran 'brew doctor', , next output,
warning: have macports or fink installed: /opt/local/bin/port can cause trouble. don't have uninstall them, may want temporarily move them out of way, e.g. sudo mv /opt/local ~/macports warning: homebrew outdated. haven't updated @ to the lowest degree 24 hours, long time in brewland! update homebrew, run `brew update`. warning: have unlinked kegs in cellar leaving kegs unlinked can lead build-trouble , cause brews depend on kegs fail run 1 time built. run `brew link` on these: gcc48 warning: have uncommitted modifications homebrew if surprise you, should stash these modifications. stashing returns homebrew pristine state can undone should later need reason. cd /usr/local/library && git stash && git clean -d -f warning: /usr/bin occurs before /usr/local/bin means system-provided programs used instead of provided homebrew. next tools exist @ both paths: erb gem git git-cvsserver git-receive-pack git-shell git-upload-archive git-upload-pack irb rake rdoc ri ruby testrb consider setting path /usr/local/bin occurs before /usr/bin. here one-liner: echo export path='/usr/local/bin:$path' >> ~/.bash_profile
i tried running echo export path='/usr/local/bin:$path' >> ~/.bash_profile
, restarted terminal , 1 time again ran brew doctor
, still complains same thing. i'm totally lost here. can guide me this? doing wrong? in advance.
you not configuring right config file. check out:
https://wiki.archlinux.org/index.php/zsh#configuring_.24path
check gcc installed correctly:
brew install gcc brew link gcc48
create alias whatever link brew created , set in .zshrc
cd /usr/local/bin ls cpp* ls c++* alias gcc=/usr/local/bin/<whatever_link_you_found>
gcc zsh gcc-warning oh-my-zsh
Comments
Post a Comment