You are probably trying to install mod_pagespeed using yum or apt-get (the .rpm or .deb binaries), but you installed Apache using a different method (cPanel, Wordpress, etc.). This will not work because mod_pagespeed binaries depend upon Apache being installed using yum or apt-get.
Instead you must either build from mod_pagespeed from source or search for mod_pagespeed + your platform to see if someone has documented an install process for that platform. For example, cPanel based installation.