Getting started steps with Mujoco: Missing shared libraries with Simulate.cpp

时间:2017-08-14 07:06:20

标签: c++ bash shared-libraries bin openai-gym

I'm trying to install Mujoco (without success) from ubuntu 17.04 (last release).

Website of instructions : Getting started

Version: mjpro150 linux and/or mjpro140 linux

I already have the license.

Following the steps:

Put mjkey.txt with activation key on bin = ok

run simulate.cpp = Error

Situation:

Directory

wil@Ophelia:~/Documents/mjpro150/bin$ ls
basic       libglewegl.so     libglfw.so.3         mjkey.txt  test
compile     libglewosmesa.so  libmujoco150nogl.so  record
derivative  libglew.so        libmujoco150.so      simulate

Path

wil@Ophelia:~/Documents/mjpro150/bin$ pwd
/home/wil/Documents/mjpro150/bin
wil@Ophelia:~/Documents/mjpro150/bin$ LD_LIBRARY_PATH=/home/wil/Documents/mjpro150/bin
wil@Ophelia:~/Documents/mjpro150/bin$ echo $LD_LIBRARY_PATH
/home/wil/Documents/mjpro150/bin

Command step and ERROR of Mujoco

wil@Ophelia:~/Documents/mjpro150/bin$ ./simulate
./simulate: error while loading shared libraries: libmujoco150.so: cannot open shared object file: No such file or directory
wil@Ophelia:~/Documents/mjpro150/bin$ ./simulate.cpp
bash: ./simulate.cpp: No such file or directory
wil@Ophelia:~/Documents/mjpro150/bin$ ./simulate ../model/humanoid.xml
./simulate: error while loading shared libraries: libmujoco150.so: cannot open shared object file: No such file or directory

Trying to compile ?! (out of getting started)

wil@Ophelia:~/Documents/mjpro150/bin$ gcc simulate -o -prog
simulate:(.rodata+0x0): multiple definition of `_IO_stdin_used'
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o:(.rodata.cst4+0x0): first defined here
simulate: In function `data_start':
(.data+0x8): multiple definition of `__dso_handle'
/usr/lib/gcc/x86_64-linux-gnu/6/crtbeginS.o:(.data.rel.local+0x0): first defined here
simulate: In function `_fini':
(.fini+0x0): multiple definition of `_fini'
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crti.o:(.fini+0x0): first defined here
simulate: In function `_start':
(.text+0x235): multiple definition of `_start'
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o:(.text+0x0): first defined here
simulate: In function `_init':
(.init+0x0): multiple definition of `_init'
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/crti.o:(.init+0x0): first defined here
simulate: In function `data_start':
(.data+0x0): multiple definition of `__data_start'
/usr/lib/gcc/x86_64-linux-gnu/6/../../../x86_64-linux-gnu/Scrt1.o:(.data+0x0): first defined here
/usr/lib/gcc/x86_64-linux-gnu/6/crtendS.o:(.tm_clone_table+0x0): multiple definition of `__TMC_END__'
simulate:(.data+0x28): first defined here
/usr/bin/ld: error in simulate(.eh_frame); no .eh_frame_hdr table will be created.
collect2: error: ld returned 1 exit status

Question: Does anyone has any idea how I proceed ?

1 个答案:

答案 0 :(得分:1)

尝试运行

LD_LIBRARY_PATH=. ./simulate ../model/humanoid.xml

作为pwd,至少

bin下{p>作为一个整体(即将所有这些字符粘贴在同一行中,然后再输入shell)

export LD_LIBRARY_PATH=/home/wil/Documents/mjpro150/bin

在致电./simulate之前。您必须导出一个环境变量,使其对于从(相同)shell启动的另一个程序可见。