我正在尝试安装openai Gym模块的atari-py,但出现以下错误:
-- The C compiler identification is GNU 4.8.5
-- The CXX compiler identification is GNU 4.8.5
-- Check for working C compiler: /bin/cc
-- Check for working C compiler: /bin/cc -- broken
CMake Error at /root/.local/lib/python3.6/site-packages/cmake/data/share/cmake-3.12/Modules/CMakeTestCCompiler.cmake:52 (message):
The C compiler "/bin/cc" is not able to compile a simple test program.
It fails with the following output:
Change Dir: /tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp
Run Build Command:"/bin/gmake" "cmTC_d4bba/fast"
gmake[1]: Entering directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
/bin/gmake -f CMakeFiles/cmTC_d4bba.dir/build.make CMakeFiles/cmTC_d4bba.dir/build
gmake[2]: Entering directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
Building C object CMakeFiles/cmTC_d4bba.dir/testCCompiler.c.o
/bin/cc -o CMakeFiles/cmTC_d4bba.dir/testCCompiler.c.o -c /tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp/testCCompiler.c
Linking C executable cmTC_d4bba
/root/.local/lib/python3.6/site-packages/cmake/data/bin/cmake -E cmake_link_script CMakeFiles/cmTC_d4bba.dir/link.txt --verbose=1
/bin/cc -rdynamic CMakeFiles/cmTC_d4bba.dir/testCCompiler.c.o -o cmTC_d4bba
/bin/ld: skipping incompatible /usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../libc.so when searching for -lc
/bin/ld: skipping incompatible //lib/libc.so when searching for -lc
/bin/ld: skipping incompatible //usr/lib/libc.so when searching for -lc
/bin/ld: cannot find -lc
collect2: error: ld returned 1 exit status
gmake[2]: *** [cmTC_d4bba] Error 1
gmake[2]: Leaving directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTC_d4bba/fast] Error 2
gmake[1]: Leaving directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
CMakeLists.txt:2 (project)
-- Configuring incomplete, errors occurred!
See also "/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeOutput.log".
See also "/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeError.log".
make: *** [build] Error 1
make: Leaving directory `/tmp/pip-install-x2v7as8m/atari-py/atari_py/ale_interface'
Could not build atari-py: Command '['make', 'build', '-C', 'atari_py/ale_interface', '-j', '47']' returned non-zero exit status 2.. (HINT: are you sure cmake is installed? You might also be missing a library. Atari-py requires: zlib [installable as 'apt-get install zlib1g-dev' on Ubuntu].)
以下是我的系统详细信息。
内核:Linux 3.10.0-693.17.1.el7.x86_64 x86_64 GNU / Linux 操作系统:Red Hat Enterprise Linux Server 7.4(Maipo) 康达4.5.11 Python 3.6.5 | Anaconda,Inc. | (默认值,2018年4月29日,16:14:56)
最令人震惊的是,它说c编译器已损坏。已经使用
安装了Cmake。yum install cmake
以及
conda install cmake
在安装glibc-static之后更新。
新错误如下:
Linking C executable cmTryCompileExec2483823887
/usr/bin/cmake -E cmake_link_script
CMakeFiles/cmTryCompileExec2483823887.dir/link.txt --verbose=1
/bin/cc CMakeFiles/cmTryCompileExec2483823887.dir/testCCompiler.c.o -o
cmTryCompileExec2483823887 -rdynamic
/bin/ld: i386 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../crt1.o' is incompatible
with i386:x86-64 output
/bin/ld: i386 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../crti.o' is incompatible
with i386:x86-64 output
/bin/ld: i386 architecture of input file
`/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../crtn.o' is incompatible
with i386:x86-64 output
/bin/ld: dynamic STT_GNU_IFUNC symbol `strcmp' with pointer equality in
`/usr/lib/gcc/x86_64-redhat-linux/4.8.5/../../../../lib64/libc.a(strcmp.o)'
can not be used when making an executable; recompile with -fPIE and relink
with -pie
collect2: error: ld returned 1 exit status
gmake[2]: *** [cmTryCompileExec2483823887] Error 1
gmake[2]: Leaving directory
`/tmp/pip-install-3ilk445h/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp'
gmake[1]: *** [cmTryCompileExec2483823887/fast] Error 2
gmake[1]: Leaving directory
`/tmp/pip-install-3ilk445h/atari-py/atari_py/ale_interface/build/CMakeFiles/CMakeTmp
CMake will not be able to correctly generate this project.