This solved it for me: sudo ldconfig
sudo ldconfig
After that, I was able to run mpicc on Ubuntu 14.04