Probably from Vulgar Latin, Late Latinolor, olōrem, itself from Latinodor, influenced by oleō. The initial n- likely became attached due to the indefinite article un(“a, an”) often preceding it. Compare Spanish, Catalan, and Occitan olor, Asturian golor.