gcc 404 Not Found

ie3xauqp  于 2023-06-23  发布在  其他
关注(0)|答案(1)|浏览(93)

我试图安装mujuco到我的linux笔记本电脑上,一切正常,直到我尝试将它导入到一个python文件。当我尝试导入/运行一个已经包含mujuco的Python脚本时,我得到了以下错误:

Import error. Trying to rebuild mujoco_py.

running build_ext

building 'mujoco_py.cymj' extension

gcc -pthread -B /home/daniel/miniconda3/envs/mujoco_py/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/daniel/.mujoco/mujoco-py/mujoco_py -I/home/daniel/.mujoco/mujoco210/include -I/home/daniel/miniconda3/envs/mujoco_py/lib/python3.8/site-packages/numpy/core/include -I/home/daniel/miniconda3/envs/mujoco_py/include/python3.8 -c /home/daniel/.mujoco/mujoco-py/mujoco_py/cymj.c -o /home/daniel/.mujoco/mujoco-py/mujoco_py/generated/_pyxbld_2.1.2.14_38_linuxcpuextensionbuilder/temp.linux-x86_64-3.8/home/daniel/.mujoco/mujoco-py/mujoco_py/cymj.o -fopenmp -w

gcc -pthread -B /home/daniel/miniconda3/envs/mujoco_py/compiler_compat -Wl,--sysroot=/ -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -fPIC -I/home/daniel/.mujoco/mujoco-py/mujoco_py -I/home/daniel/.mujoco/mujoco210/include -I/home/daniel/miniconda3/envs/mujoco_py/lib/python3.8/site-packages/numpy/core/include -I/home/daniel/miniconda3/envs/mujoco_py/include/python3.8 -c /home/daniel/.mujoco/mujoco-py/mujoco_py/gl/osmesashim.c -o /home/daniel/.mujoco/mujoco-py/mujoco_py/generated/_pyxbld_2.1.2.14_38_linuxcpuextensionbuilder/temp.linux-x86_64-3.8/home/daniel/.mujoco/mujoco-py/mujoco_py/gl/osmesashim.o -fopenmp -w
gcc -pthread -shared -B /home/daniel/miniconda3/envs/mujoco_py/compiler_compat -L/home/daniel/miniconda3/envs/mujoco_py/lib -Wl,-rpath=/home/daniel/miniconda3/envs/mujoco_py/lib -Wl,--no-as-needed -Wl,--sysroot=/ /home/daniel/.mujoco/mujoco-py/mujoco_py/generated/_pyxbld_2.1.2.14_38_linuxcpuextensionbuilder/temp.linux-x86_64-3.8/home/daniel/.mujoco/mujoco-py/mujoco_py/cymj.o /home/daniel/.mujoco/mujoco-py/mujoco_py/generated/_pyxbld_2.1.2.14_38_linuxcpuextensionbuilder/temp.linux-x86_64-3.8/home/daniel/.mujoco/mujoco-py/mujoco_py/gl/osmesashim.o -L/home/daniel/.mujoco/mujoco210/bin -Wl,-R/home/daniel/.mujoco/mujoco210/bin -lmujoco210 -lglewosmesa -lOSMesa -lGL -o /home/daniel/.mujoco/mujoco-py/mujoco_py/generated/_pyxbld_2.1.2.14_38_linuxcpuextensionbuilder/lib.linux-x86_64-3.8/mujoco_py/cymj.cpython-38-x86_64-linux-gnu.so -fopenmp

Traceback (most recent call last):
  File "setting_state.py", line 7, in <module>
    from mujoco_py import load_model_from_xml, MjSim, MjViewer
  File "/home/daniel/.mujoco/mujoco-py/mujoco_py/__init__.py", line 2, in <module>
    from mujoco_py.builder import cymj, ignore_mujoco_warnings, functions, MujocoException
  File "/home/daniel/.mujoco/mujoco-py/mujoco_py/builder.py", line 504, in <module>
    cymj = load_cython_ext(mujoco_path)
  File "/home/daniel/.mujoco/mujoco-py/mujoco_py/builder.py", line 111, in load_cython_ext
    mod = load_dynamic_ext('cymj', cext_so_path)
  File "/home/daniel/.mujoco/mujoco-py/mujoco_py/builder.py", line 130, in load_dynamic_ext
    return loader.load_module()

ImportError: /home/daniel/miniconda3/envs/mujoco_py/bin/../lib/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /lib/x86_64-linux-gnu/libOSMesa.so.8)

  [1]: https://i.stack.imgur.com/gUhXI.png

我安装了gcc 11.0.2,在我的虚拟环境中使用python3.8。以下是我的具体步骤https://docs.google.com/document/d/1eBvfKoczKmImUgoGMbqypODBXmI1bD91/edit
所有的工作都是相应的,直到最后一步,我尝试运行一个实际的Python模块
我真的不知道为什么会发生这种情况,我已经尝试了互联网上的一切。如果有人能帮忙的话我会很感激的。

h4cxqtbf

h4cxqtbf1#

/home/daniel/miniconda3/envs/mujoco_py/lib/libstdc++.so.6从何而来?一些东西捆绑了libstdc++.so.6的版本,它比你的系统版本“旧”,其他系统库依赖于新版本。您应该可以通过删除主目录中的文件来修复此问题。

相关问题