So I am trying to install Metasploit on my mac running running latest version of Sierra 10.12.1. I already have Homebrew installed, and I installed latest version Xcode from the Appstore, but when I try installing Metasploit I get the error:

Omar$ ./msf_install.sh -i -p msfpassword -r
[*] Log file with command output and errors /tmp/msfinstall-Nov-08-16-130717.log
[*] Verifying that Development Tools and Java are installed:
[*] Java is installed.
[*] Xcode is not installed on this system. Install from the Apple AppStore.

Even though I just installed Xcode. Things I have tried:

  • To make sure Xcode is installed I ran the command: xcode-select -p
    and it gives: /Applications/Xcode.app/Contents/Developer which I believe is correct.

  • I ran brew doctor and it says everything is ok and I am ready to brew

  • I ran xcode-select --install and it says "command line tools are already installed, use "Software Update" to install updates" (even though everything is up to date!)

Please help, this thing is driving me insane!

  • Have you launched Xcode at least once, accepted the license agreement and let it install some additional tools?
    – klanomath
    Nov 8, 2016 at 19:37
  • @klanomath Yes I have, it said installing components and stuff and I let it do that.
    – Omar
    Nov 8, 2016 at 20:22

1 Answer 1


I solved the problem! All I had to do was open the msf_install.sh file with Xcode. Then change the "com.apple.pkg.XcodeMAS" to "com.apple.pkg.Xcode". Thats it. The reason this problem occurs is because newer versions of Xcode don't use the "MAS" in the file name. The person who made the msf_install.sh file made it a while ago before the file name was changed.

You must log in to answer this question.

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