Ubuntu 16.04中Matlab无法运行(LibGL错误及许可证错误)
Alright, let's break down your MATLAB issues on Ubuntu 16.04—you've got two separate problems here: the libGL driver errors and the License Manager Error -15. Let's fix them one by one:
Those libGL error: No driver found messages mean your system can't locate a working OpenGL driver, which MATLAB needs for its UI and rendering. Here's how to fix this:
Check and install your graphics driver
First, identify your GPU with this command:lspci | grep VGA- If you have an NVIDIA GPU, install the compatible driver for Ubuntu 16.04 (nvidia-384 is a stable choice for this release):
sudo apt-get update && sudo apt-get install nvidia-384 - If you have Intel integrated graphics, install the Mesa utilities and drivers:
sudo apt-get install mesa-utils libgl1-mesa-glx
Reboot your system after installing the driver.
- If you have an NVIDIA GPU, install the compatible driver for Ubuntu 16.04 (nvidia-384 is a stable choice for this release):
Fix MATLAB's conflicting library files
MATLAB ships with its own version of some system libraries that can clash with Ubuntu's. To resolve this, rename MATLAB's conflicting libGL-related files:
Navigate to MATLAB's system library directory (replaceR20XXxwith your MATLAB version, e.g., R2020a):cd /usr/local/MATLAB/R20XXx/sys/os/glnxa64/Then rename the problematic libraries:
sudo mv libstdc++.so.6 libstdc++.so.6.old sudo mv libgcc_s.so.1 libgcc_s.so.1.oldThis forces MATLAB to use your system's up-to-date libraries instead.
Verify the fix
Run this command to confirm OpenGL is working:glxinfo | grep "OpenGL renderer"You should see your GPU model listed here if the driver is installed correctly.
Error -15 means MATLAB can't connect to your school's license server. This is almost always a network or configuration issue:
Check network connectivity to the license server
First, find your license server's IP or hostname from your MATLAB license file (usually located at/usr/local/MATLAB/R20XXx/licenses/license.dat—look for the line starting withSERVER). Ping the server to test connectivity:ping <server-hostname-or-ip>If ping fails, reach out to your school's IT team to confirm:
- The license server is online
- Your school's wireless network allows access to the server's ports (MATLAB uses ports 27000-27009 by default)
Verify your license configuration
Open thelicense.datfile and double-check theSERVERandUSE_SERVERlines. They should look something like this:SERVER your-server-hostname 001122334455 27000 USE_SERVEREnsure there are no typos in the hostname/IP, MAC address, or port number.
Configure proxy settings (if needed)
Many school networks use proxies. If your system requires a proxy to access internal servers, launch MATLAB with proxy parameters:matlab -proxyhost <proxy-ip> -proxyport <proxy-port>Alternatively, you can set proxy settings permanently in MATLAB's preferences: go to Home > Preferences > Web > Network Proxy and enter your school's proxy details.
Restart MATLAB and test
After making these changes, close MATLAB completely, then launch it again with thematlabcommand. The license checkout should work if the network and configuration are correct.
内容的提问来源于stack exchange,提问作者Eric Garcia

