0

I'm running Mavericks 10.9.5 and I have tried to install Metasploit from this guide.

It was until the Install Homebew I used

echo PATH=/usr/local/bin:/usr/local/sbin:$PATH >> ~/.bash_profile

And now I get this error every time I open Terminal:

-bash: /Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Nessus/run/sbin:/opt/X11/bin:/usr/local/bin:/usr/local/sbin: No such file or directory
-bash: /Users/Renzo/.bash_profile: line 7: syntax error in conditional expression
-bash: /Users/Renzo/.bash_profile: line 8: syntax error near `PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Nessus/run/sbin:/opt/X11/bin"'
-bash: /Users/Renzo/.bash_profile: line 8: `PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Nessus/run/sbin:/opt/X11/bin"'

All commands seem to work just fine but the errors concern me. I have opened the .bash_profile before and deleted anything to do with rvm on all 'profiles' prior to this error but the errors are referring to the bash_profile. This is what the bash profile currently looks like:

# Setting PATH for Python 3.4
# The orginal version is saved in .bash_profile.pysave
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:${PATH}"
export PATH
/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Nessus/run/sbin:/opt/X11/bin:/usr/local/bin:/usr/local/sbin

[[ -s "$HOME/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Nessus/run/sbin:/opt/X11/bin:/usr/local/bin:/usr/local/sbin"
PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Nessus/run/sbin:/opt/X11/bin"

Does anyone know how to fix this? I want this fixed as soon as possible so I can backup my drive for the first time using Time Machine and upgrade to Yosemite. There was a major vulnerability called Rootpipe that was allegedly fix for ONLY Yosemite 10.10.3 and not older firmwares but that was reportedly a failed fix by a former NSA staff a couple days ago.

1
  • One line with an extra trailing quote? This counts as too localized IMO and should be closed|deleted. Commented Apr 26, 2015 at 1:55

2 Answers 2

0

This line has an extra single quote at the end. Take that off and try to source the file again. source ~/.bash_profile.

PATH="/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Nessus/run/sbin:/opt/X11/bin"'
1
0

Lines 5 and 7 are both bad and should be deleted commented out until/unless somebody can figure out what they are supposed to be.

  • Line 5:

    /Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Nessus/run/sbin:/opt/X11/bin:/usr/local/bin:/usr/local/sbin
    

    simply expresses the value of $PATH as if it were a command.  Since that is not a valid command, it produces the first error: No such file or directory.

  • Line 7:

    [[ -s "$HOME/Library/Frameworks/Python.framework/Versions/3.4/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/Library/Nessus/run/sbin:/opt/X11/bin:/usr/local/bin:/usr/local/sbin"
    

    is an incomplete command.  [[ should be paired with ]].  But appending ]] to the line isn't the answer, since that would result in a statement that checks for the existence and size with a file with a name that is the value of $PATH (or something similar to it), which is a highly unlikely filename, and then doesn't do anything with the result of the test.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .