Coprohagia is the technical term for eating feces.
It's most often boredom rather than a nutritional deficiency. There's a product called Forbid that sometimes works to deter it from eating it's feces. Some people swear by meat tenderizer, others try tabasco sauce. Tabasco sauce doesn't always work though, and after a few days it seems to no longer be effective.
pineapple juice worked well for me; it makes their poop bitter. i think there are quite a few theories as to why dogs eat their poop, none of which have been proven from what i know. if you google coprophagia you should come up with more than enough information regarding the subject. i know it's gross, but it is not uncommon. i have a poop eater myself, so don't feel alone! lol