I was having this problem while trying to run the Android emulator on my machine. To fix it you can use this command for Fedora:
1
sudo yum install mesa-libGL-devel
or this command for Ubuntu:
1
sudo apt-get install libgl1-mesa-dev
android
linux
mobile
]