"Xcode is not installed on this system. Install from the Apple Appstore." message when installing Metasploit 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!
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.