If you are creating configuration database by using PowerShell, then you might get a chance to face this error. The error message is localhost is an invalid or loopback address.
If you are using a local account to configure SharePoint then you will get the below error.
The specified user "username" is a local account. Local accounts should only be used in stand alone mode.
One solution to over come the issue is given here
Here in the 3rd step when it ask for Entered the DatabaseServer name and if you give the server name as localhost, (local) or (.), then the error will come.
The solution to the above error is, try to give the machine name or the machine ip address.