Provided is a method for producing a compound represented by formula (6) the method including a step of mixing a compound represented by formula (4) with a compound represented by formula (5) so as to generate a salt of the compound represented by formula (4) and the compound represented by formula (5) and a step of deprotecting the protecting group P on the salt. (In the formulae P denotes a protecting group and P denotes a protecting group.)