Can't open viewer with the command"python -m mujoco.viewer" ; Error info:libGL error: MESA-LOADER...
Hi,
I'm looking for some help with the GUI of Mujoco
System Info Ubuntu 22.04 NVIDIA driver 525 Kernel 6.0.0-1010-oem #10-Ubuntu
Error message libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri) libGL error: failed to load driver: iris libGL error: MESA-LOADER: failed to open iris: /usr/lib/dri/iris_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri) libGL error: failed to load driver: iris libGL error: MESA-LOADER: failed to open swrast: /usr/lib/dri/swrast_dri.so: cannot open shared object file: No such file or directory (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri, suffix _dri) libGL error: failed to load driver: swrast /home/jeffery/.local/lib/python3.10/site-packages/glfw/init.py:912: GLFWError: (65543) b'GLX: Failed to create context: BadValue (integer parameter out of range for operation)' warnings.warn(message, GLFWError) ERROR: could not create window
Press Enter to exit ...
Additional
I successfully opened it at the beginning. But then I have accidentally run "apt upgrade" Then occur this problem, the Graphic driver problem(nvidia-smi not showing correctly).
But I have already used the --purge command to remove all graphic driver and reinstall it. The NVIDIA display driver is functional now But this Problem with the Mujoco viewer still.
Please anyone know how to solve it?
I have read some relevant posts online regarding libGL error, however, they were not helpful. Thank you !
The problem is solved !! It is because the apt update makes the soft links of lib break. use ll command to check the file
strings libstdc++.so.6 | grep GLIBCXX_3.4.30 (if broke can't find it )
locate libstdc++.so.6 (locate workable file )
select one (should be the /usr/lib/x86_64-linux-gnu one ) using the str command above to grep again, the fine is here!
rm the problematic file in dictionary
ln -s the dictionary of good file to the problematic dichotomy .
(create a softlink to the correct location )
Anyway, it its roughly the solution of my case
@cidxb could you please explain this fix in simple terms? I am currently facing the same issues. I am also on ubuntu 22.04
@cidxb could you please explain this fix in simple terms? I am currently facing the same issues. I am also on Ubuntu 22.04
### It is basically a broken file soft link problem, which means the file you want is not here really, but an indicator of where it is, but this link broke, and then the program is unable to find it. SO WE WANT TO REBUILD THE LINK.
- use
llcommand to check the file(in this case,ll iris_dri.so) ### Check the file link - use command
strings libstdc++.so.6 | grep GLIBCXX_3.4.30### Find this missing .so library - use the command
locate libstdc++.so.6###To find where in your system has this file/libray - remove the old/problematic file which has been reported as
No such file or directory; Such as the commandrm usr/lib/dri/iris_dri.so: - use the command
ln -sto link the dictionary of the good file to the problematic dictionary. ### Create a soft link to the correct location
@cidxb I am sorry I am extremely new to linux so this might sound a dumb question
I followed your instructions up till 3, and getting this when I try the locate libstdc++.so.6
I don't understand step 4 and 5, how am I supposed to know which is the problematic file? (i would have tried the same file but I don't see that in the options given)
@cidxb I am sorry I am extremely new to linux so this might sound a dumb question I followed your instructions up till 3, and getting this when I try the
locate libstdc++.so.6I don't understand step 4 and 5, how am I supposed to know which is the problematic file? (i would have tried the same file but I don't see that in the options given)
What is your original error trance back? You can check it. That should state what file went wrong, you delete it, and follow the step 4 and 5 to create a new file that can work. It is very simple.
Thanks for all the help I finally figured it out. If someone also has some other doubts they can check this stackoverflow post
conda install -c conda-forge libstdcxx-ng
I tried this, fix issue. Hoe this works for you guys
@kingchou007 Your method works, thanks. Simple and straightforward~
