Is he housed with another male guinea pig? Is the stuff always in the same place? Is it very hard when it dries?
If he has a male cage mate and the location of the stuff is different from time to time, it's boar glue (dried semen). If it's always in the same place, and isn't hard, he may have a sebaceous cyst that opens occasionally. To clear that up, the vet may have to remove it to get the capsule out, but it's not a serious surgery. But do find an exotic vet to do it so you'll have someone who knows how to manage the anesthesia -- dog-and-cat vets know little to nothing about guinea pigs.