Answer: He has to make a sacrifice to Poseidon.
Step-by-step explanation:
Odysseus´ final task was commanded to him by the Prophet Tiresias. He´s meant to travel to a town that knows nothing about the sea, where, when another traveler starts following him, he must sacrifice a ram, a bull, and a wild boar to Poseidon. Only after that, he might return home to live a long life and die painlessly in old age with the blessing of all the people of Ithaca.