I reinstalled Lion recently and ran into an issue where sound would not work on my Mac. The sound icon in the upper right was greyed out, and if I used the volume keys it wouldn’t do anything and just show an X on the screen. After reinstalling multiple times I figured out I just had to plug in some headphones and take them out and it worked!
What a headache! Hope this will save someone some time. Not sure why this happened, but I figured it could possibly be hardware or something?
TechSmog

Thanks, it helped a lot.
For most problems, cleaning up my Mac works for me. Most probably the monitoring process must have gone wild.
thanks a lot for sharing … saved me from reinstalling multiple times — and a big #fail to apple
Such a weird issue. Thank you so much for this post! It saved me hours and hours of debugging!
Thank you. My sound icon was disabled w/ line through it. MBPro speakers did not work. Plugged in headphones, adjusted volume, worked. Unplugged headphones, then internal speakers worked again. very weird.
That actually didn’t work for me, and I really want to get this bugger fixed, I can’t live without my iTunes and I don’t know HOW I survived the last 24 hours.