In order to install any developer, you need to install Xcode (https://developer.apple.com/xcode/); you will need to set up an account on connect.apple.com to download the respective Xcode version tools.
However, there is another way you can install command-line tools using a utility, which comes along with an Xcode called xcode-select, which is shown here:
% xcode-select --install
The preceding command should trigger an installation wizard for the command-line tools. Follow the installation wizard, and you will be able to install it successfully.