Can only gases by diatomic? [duplicate]

This question already has an answer here:

I know that the elements H, N, F, O, I, Cl, and Br are found naturally as diatomic gases. But can any other elements be found as diatomic gases, or even solids or liquids.

Why or why not?