Any eye problems should be examining by a veterinarian. You should not leave an eye problem untreated.
Constipation can be caused by many things but usually it is due to a poor/incorrect diet. You need to make sure your husbandry is 100% correct. Your guinea pig's daily diet should contain hay, clean water and fresh greens. Pellets provide vegetable matter combined with vitamin C, but if your cavy eats too many in proportion to his regular diet he may get constipated. I suggest you feed him some low-sugar fruits (such as a piece of unpeeled apple or pear peel) and some leafy greens as they have a high water content. Putting a few drops of olive oil on a treat he enjoys can also help move things along. Finally, you should start him on a probiotic.
(
https://www.jefferspet.com/products/bene-bac-plus )
(
https://www.petco.com/content/petco/PetcoStore/en_US/pet-services/resource-center/food-nutrition/guinea-pig-care-diet-and-feeding-tips.html )
I would recommend Oxbow hay and pellets that you can buy at your local Petco or online.
If he is still having trouble in 12-24 hours I suggest you have him examined by your local vet.