While the majority of dog owners have more experience with doggy diarrhea than constipation, pups do on occasion become constipated.
Sometimes the problem is no more complicated than a lack of fiber in the diet or inadequate water consumption, but there can be more serious causes as well.
The following is good advice from Dogtime.com:
“Please keep in mind that you should always consult your vet before making any changes to your dog's diet or administering medications (and also to be certain that he isn't exhibiting symptoms of a more serious illness or disorder).”
Note: My recommendations for constipation remedies can be found toward the end of the following comment, and differ from those listed in the Dogtime.com article.