One of the best ways to avert altitude sickness is properly preparing your body. Start by going for a medical check-up to ensure that you are healthy and fit. You can also try aerobic training and learn about yoga breathing techniques.
You should also make sure to stay well hydrated, and you could try exposure therapy by gradually trying out higher altitudes. Ensure that you give your body enough time to acclimatize, and you can also try various herbal and natural remedies.