Fixing Ubuntu Error: Failed to load libGL.so
I encountered this error when I was trying to run my Android Emulator on Ubuntu. After searching for some answers in the Internet, it turns out that I only had to install the necessary development packages to fix the error.
Inside the terminal, execute the following:
sudo apt-get install libgl1-mesa-dev
After the installation, your computer will now have the libgl.so.