安装ale_python_interface时遇到make错误
1、
首先按照https://pypi.org/project/ale-python-interface/0.0.1/来安装,直接python3 -m pip

但提示缺少一个头文件ale_c_wrapper.h,报错如下:
ale_python_interface/ale_c_wrapper.cpp::: fatal error: ale_c_wrapper.h: No such file or directory
#include "ale_c_wrapper.h"
^~~~~~~~~~~~~~~~~
compilation terminated.
error: command 'x86_64-linux-gnu-gcc' failed with exit status
不过这个网上有一个blog写到这个问题,不过他的方法我试了不可以,你们可以试试:https://blog.csdn.net/senjie_wang/article/details/84073823
2、
然后按照https://github.com/bbitmaster/ale_python_interface/wiki/Installation-Instructions,来安装。
结果在第一大步的最后一小步,make时出错,报错如下:
MsPacman.cpp:(.text+0x18a): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
MsPacman.cpp:(.text+0x1da): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
MsPacman.cpp:(.text+0x1c2): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/NameThisGame.o: In function `NameThisGameSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
NameThisGame.cpp:(.text+0x172): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
NameThisGame.cpp:(.text+0x193): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Pong.o: In function `PongSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Pong.cpp:(.text+0x152): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Pong.cpp:(.text+0x173): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Pooyan.o: In function `PooyanSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Pooyan.cpp:(.text+0x18a): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Pooyan.cpp:(.text+0x1ab): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/PrivateEye.o: In function `PrivateEyeSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
PrivateEye.cpp:(.text+0x152): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
PrivateEye.cpp:(.text+0x173): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/SpaceInvaders.o: In function `SpaceInvadersSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
SpaceInvaders.cpp:(.text+0x192): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
SpaceInvaders.cpp:(.text+0x1b3): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/StarGunner.o: In function `StarGunnerSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
StarGunner.cpp:(.text+0x1e2): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
StarGunner.cpp:(.text+0x203): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Tennis.o: In function `TennisSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Tennis.cpp:(.text+0x1da): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Tennis.cpp:(.text+0x1fb): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Tutankham.o: In function `TutankhamSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Tutankham.cpp:(.text+0x1aa): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Tutankham.cpp:(.text+0x1cb): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/VideoPinball.o: In function `VideoPinballSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
VideoPinball.cpp:(.text+0x19a): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
VideoPinball.cpp:(.text+0x1bb): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/YarsRevenge.o: In function `YarsRevengeSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
YarsRevenge.cpp:(.text+0x171): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
YarsRevenge.cpp:(.text+0x199): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
YarsRevenge.cpp:(.text+0x1b9): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/games/supported/Zaxxon.o: In function `ZaxxonSettings::setMode(unsigned int, System&, std::unique_ptr<StellaEnvironmentWrapper, std::default_delete<StellaEnvironmentWrapper> >)':
Zaxxon.cpp:(.text+0x149): undefined reference to `StellaEnvironmentWrapper::pressSelect(unsigned long)'
Zaxxon.cpp:(.text+0x169): undefined reference to `StellaEnvironmentWrapper::softReset()'
src/environment/stella_environment.o: In function `StellaEnvironment::getWrapper()':
stella_environment.cpp:(.text+0x7ae): undefined reference to `StellaEnvironmentWrapper::StellaEnvironmentWrapper(StellaEnvironment&)'
collect2: error: ld returned exit status
makefile:: recipe for target 'ale' failed
make: *** [ale] Error
从这个报错中,就可以发现,基本就是StellaEnvironmentWrapper::* 什么什么没有定义。
终于找到相关的文件stella_environment_wrapper.cpp 和 stella_environment_wrapper.hpp
在下载的文件Arcade-Learning-Environment的./src/environment/目录下面。
从下面截图就能发现很奇怪,在make一遍后,相关文件都被编译成.o文件了,却没有stella_environment_wrapper.o文件:

于是打开这个目录里面的module.mk文件:$ vi module.mk

为什么只产生三个.o文件,不生成stella_environment_wrapper.o文件啊。
于是把它改成:

就是多加了一行,生成对应的stella_environment_wrapper.o文件。
然后再返回到Arcade-Learning-Environment目录,然后再执行一遍make。
再执行一遍$ ls,看到当前目录下有libale.so,就成功了

OK
done.
Reference:
https://github.com/bbitmaster/ale_python_interface/issues/7
安装ale_python_interface时遇到make错误的更多相关文章
- 安装APK时引发INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误的几种可能(申明:来源于网络)
安装APK时引发INSTALL_PARSE_FAILED_MANIFEST_MALFORMED错误的几种可能(申明:来源于网络) 地址:https://my.oschina.net/freestyle ...
- 安装node-sass时出现的错误解决方案(Mac自用,也可以借鉴)
安装node-sass时出现一下错误: gyp ERR! configure error gyp ERR! stack Error: EACCES: permission denied, mkdir ...
- apt-get install安装软件时出现依赖错误解决方式
在使用apt-get install安装软件时,常常会遇到如上图所看到的错误.该错误的意思为缺少依赖软件.解决方式为: aptitude install golang-go
- 安装pandas时出现环境错误
在安装pandas时出现Could not install packages due to an EnvironmentErrorConsider using the `--user` option ...
- 安装Caffe时出现的错误
一.error MSB3073类错误 一般是由于CommonSettings.props配置出现错误. 第一处是你安装CUDA的版本号,第二次是你安装cudnn的路径. 也可参照http://blog ...
- yum install错误 系统环境:Oracle Linux5.4 在通过yum安装软件时出现以下错误:
1.yum配置文件 1 [root@rh168 yum.repos.d]# cat yum.repo 2 [base] 3 name=Oracle linux 4 baseurl=file:/// ...
- 安装VisualStudio时失败,错误信息安装包失败或证书不在有效期内
本人安装VisualStudio2012的时候,安装失败有:错误信息安装包失败或证书不在有效期内等 网上查找相关信息,得到的答案很少,我重新网上下载同版本软件继续之前的下载,但还是无效 之后我把软件卸 ...
- 安装Office2007时出现1706错误的解决方案
前几天,重做了系统.周末因为接到一笔单子,很兴奋啊.第一次接到私活.然后就装Office2007,打算看需求的.居然安装的时候出现错误,提示1706错误,后面一串错误信息,也懒得看,以为是文件坏了. ...
- Ubuntu16.04安装truffle时的一些错误
1.使用truffle时出现 Error: /usr/bin/env: node: 没有那个文件或目录 1.如果是用sudo apt-get install nodejs命令安装的nodejs, ub ...
随机推荐
- 关于window.console&&console.log(123)的思考
一.JS的且运算记得最开始看到window.console&&console.log(123),当时知道能起什么作用但是没有深入研究,最近在研究后总算弄明白了.要理解这个,首先得明白三 ...
- java 配置在.properties文件中的常量
不让用常量类,那就用.properties文件配置,放在根目录. import java.util.HashMap; import java.util.Iterator; import java.ut ...
- 虚拟机centos笔记整理,持续更新~~
远程拷贝文件:scp -r 文件名 主机名:完整路径名(冒号不能少)拷贝当前windows系统的文件到当前目录:rz -y 查找文件:updatedb 修改数据库locate 文件名 即可查找文件
- svn 不能校验路径“XXX”的锁;没有匹配的可用锁令牌 故障解决方法
原文出自:https://blog.csdn.net/seesun2012 故障现象: svn Commit ,失败,提示: 不能校验路径"/SEESUN/****系统计划说明书.docx& ...
- sublime text 2编辑器中文问题
Sublime Text 2是一个非常不错的源代码及文本编辑器,但是不支持GB2312和GBK编码在很多情况下会非常麻烦.不过Sublime Package Control所以供的插件可以让Subli ...
- Java - 深拷贝技巧
先让我描述一下问题:我在某Action(struts2.x)-A中写了一个功能P,以当前用户的某个标识F == 1时需要走这个功能,而且这个功能因某些原因已经侵入到了其他一些method中.顺便一提, ...
- Java使用反射来获取成员变量泛型信息
Java通过指定类对应的Class对象,程序可以获得该类里包括的所有Field,不管该Field使用private修饰,还是使用public修饰.获得了Field对象后,就可以很容易的获得该Field ...
- poj3260 平衡问题(二维01背包)
http://www.cnblogs.com/ziyi--caolu/p/3228090.html http://blog.csdn.net/lyy289065406/article/details/ ...
- python 2.7支持中文
在代码的第一行加上#coding=utf-8 return render_template('index.html',message=u"小明小明")print u'你要打印的字符 ...
- csharp: using OleDb Getting the identity of the most recently added record
/// <summary> /// 执行SQL语句,返回影响的记录数 /// </summary> /// <param name="SQLString&quo ...