question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Libmujoco.so.2.1.1: cannot open shared object file: No such file or directory

See original GitHub issue

when I run: from dm_control import suite the error is: `/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/glfw/init.py:906: GLFWError: (65544) b’X11: The DISPLAY environment variable is missing’ warnings.warn(message, GLFWError) WARNING:absl:mjbindings failed to import mjlib and other functions. libmujoco.so may not be accessible. Traceback (most recent call last): File “<stdin>”, line 1, in <module> File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/dm_control/suite/init.py”, line 24, in <module> from dm_control.suite import acrobot File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/dm_control/suite/acrobot.py”, line 20, in <module> from dm_control import mujoco File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/dm_control/mujoco/init.py”, line 18, in <module> from dm_control.mujoco.engine import action_spec File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/dm_control/mujoco/engine.py”, line 42, in <module> from dm_control.mujoco import index File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/dm_control/mujoco/index.py”, line 88, in <module> from dm_control.mujoco.wrapper import util File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/dm_control/mujoco/wrapper/init.py”, line 20, in <module> from dm_control.mujoco.wrapper.core import callback_context File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/dm_control/mujoco/wrapper/core.py”, line 29, in <module> from dm_control.mujoco.wrapper.mjbindings import functions File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/dm_control/mujoco/wrapper/mjbindings/functions.py”, line 17, in <module> mjlib = util.get_mjlib() File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/site-packages/dm_control/mujoco/wrapper/util.py”, line 123, in get_mjlib return ctypes.cdll.LoadLibrary(library_path) File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/ctypes/init.py”, line 451, in LoadLibrary return self._dlltype(name) File “/home/yzc_20/anaconda3/envs/urlb/lib/python3.8/ctypes/init.py”, line 373, in init self._handle = _dlopen(self._name, mode)

OSError: /home/yzc_20/.mujoco/mujoco-2.1.1/lib/libmujoco.so.2.1.1: cannot open shared object file: No such file or directory` I don’t know how to fix this bug, hope for your reply, thx!~

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
kevinzakkacommented, Feb 25, 2022

@gemcollector You don’t need a license anymore. Here’s a script that’s been working for me. Note I don’t even need to define LD_LIBRARY or MJLIB_PATH and everything works smoothly.

  1. Rename your old mujoco directory to mujoco_temp or just delete it.
  2. Run the following script:
#!/usr/bin/env bash
#
# This script installs Mujoco 2.1.1.

wget https://github.com/deepmind/mujoco/releases/download/2.1.1/mujoco-2.1.1-linux-x86_64.tar.gz
tar -xf mujoco-2.1.1-linux-x86_64.tar.gz
mkdir -p ~/.mujoco
mv mujoco-2.1.1 ~/.mujoco
rm -r mujoco-2.1.1-linux-x86_64.tar.gz

# Install GLFW and GLEW for hardware accelerated rendering.
sudo apt install libglfw3 libglew2.1 libglew-dev
1reaction
gemcollectorcommented, Feb 25, 2022

I find the problem. It is important to install a correct version of mujoco-2.1.1: mujoco-2.1.1-linux-x86_64.tar.gz I didn’t install a x86 version. @kevinzakka thx for your instruction and thx @saran-t for your reply! I have solved problem!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Support MuJoCo 2.1.1 (including arm64 mac support) #662
The path to the shared library has changed to lib/libmujoco.so (previously ... failed: No such file or directory on my M1 macbookpro.
Read more >
正确配置dm_control with mujoco-2.1.1_花_哥的博客
OSError : /home/yzc_20/.mujoco/mujoco-2.1.1/lib/libmujoco.so.2.1.1: cannot open shared object file: No such file or directory.
Read more >
openai - Bountysource
_compile(obj, src, ext, cc_args, extra_postargs, pp_opts) File ... I'm able to use env that requires mujoco such as 'CartPole-v1', but can't render any...
Read more >
libmujoco.so.2.1.1:无法打开共享对象文件 - 编程技术网
Libmujoco.so.2.1.1: cannot open shared object file: No such file or directory. when I run: from dm_control import suite the error is: ...
Read more >
Configure DM correctly_ control with mujoco-2.1.1
OSError : /home/yzc_20/.mujoco/mujoco-2.1.1/lib/libmujoco.so.2.1.1: cannot open shared object file: No such file or directory.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found