Breakdown of La farmacia está cerca del ayuntamiento.
Questions & Answers about La farmacia está cerca del ayuntamiento.
Cerca de is a fixed expression meaning near or close to.
So:
You need the de after cerca. You cannot normally just say cerca el ayuntamiento.