Python 有人知道如何在Ubuntu上编译Megahal吗?
我已经试着编译megahal几个小时了,但我似乎什么也没有得到。有人在这方面取得了成功吗? 我一直收到一个错误,上面写着:Python 有人知道如何在Ubuntu上编译Megahal吗?,python,ubuntu,Python,Ubuntu,我已经试着编译megahal几个小时了,但我似乎什么也没有得到。有人在这方面取得了成功吗? 我一直收到一个错误,上面写着: inlined from ‘load_personality.constprop’ at megahal.c:3283:8, inlined from ‘change_personality.constprop’ at megahal.c:3332:5: /usr/include/x86_64-linux-gnu/bits/stdio2.h:293:2: warning:
inlined from ‘load_personality.constprop’ at megahal.c:3283:8,
inlined from ‘change_personality.constprop’ at megahal.c:3332:5:
/usr/include/x86_64-linux-gnu/bits/stdio2.h:293:2: warning: call to ‘__fread_chk_warn’ declared with attribute warning: fread called with bigger size * nmemb than length of destination buffer
return __fread_chk_warn (__ptr, __bos0 (__ptr), __size, __n, __stream);
^
cc1: some warnings being treated as errors
error: command 'x86_64-linux-gnu-gcc' failed with exit status 1
Makefile:44: recipe for target 'pythonmodule' failed
make: *** [pythonmodule] Error 1
我已经通过sudo apt get安装了python,并且我已经检查了所有关于“x86_64-linux-gnu-gcc”的线程,但是我没有找到解决方案您需要python开发人员模块python-dev。这将对您有所帮助 在ubuntu上升级到vivid 15.04后,我无法再编译该模块,所以我尝试了其他方法。因为在主文件夹中有一个名为Megahal的目录,其中有一个Makefile,所以我尝试从那里编译。首先你需要去那个目录
cd /home/user/Downloads/megahal-9.1.1/Megahal/
您需要去解压缩归档文件的地方,在那里您可以阅读自述文件并开始编译
perl Makefile.PL
我把我能找到的丢失的文件复制到那个文件夹,然后从那里开始
make
make test
但这对我和后来的人都不起作用
make install
我不得不这么做
sudo make install
仅此而已。不幸的是,我认为perl有一个问题。
在我将模块PL_thr_键加载到eggdrop之后,我一直从模块PL_thr_键中得到这个错误。除模块外,eggdrop工作正常。没有模块,没有AI,也没有乐趣:您之所以会遇到这些错误,仅仅是因为您没有安装python开发头。您可以使用以下命令安装它 sudo apt get安装Python2.x版的Pythondev
sudo apt get install python3 dev for python3感谢您的回复。我用Python2和Python3尝试了这个。我甚至删除了它们并再次尝试,错误依然存在。谢谢你的回复。很奇怪,这种方法奏效了。maketest是唯一不起作用的步骤,但是当我尝试从命令提示符启动megahal时,仍然没有任何结果。当我尝试从cd/home/user/Downloads/megahal-9.1.1编译时,仍然会出现gcc错误