If we knew how to stop corruption, there would surely be less of it in the world. We do not know for sure how to end corruption in all places.
One way to end corruption is to give better salaries to those who tend to take bribes. For example, if civil servants had better salaries (particularly in developing countries) they might not feel like they need to take bribes from those who come in to get licenses or other such things. Here in the US, civil servants get decent pay and are less likely to be corrupt than in many developing countries.
It is also important to reduce the culture of corruption. In many developing countries, even those who have no real need take things for themselves. We can see this in the cases of people like Qadaffi in Libya whose family had so much ill-gotten wealth. When there is such a culture, of course the "lower" people will want to take advantage of their positions.
Of course, neither of these is easy to do, which is one reason why corruption continues to flourish.