yum install python-opengl
yum install python-devel SDL_image-devel SDL_mixer-devel SDL_ttf-devel SDL-devel smpeg-devel numpy subversion portmidi-devel
wget http://www.libsdl.org/release/SDL-1.2.14.tar.gz
./src/video/x11/SDL_x11sym.h:168: 错误:与‘_XData32’类型冲突
解决方案:查阅了一些资料,发现是libx11-dev版本问题(查看版本如图),版本>1.5.99,所以需要修改src/video/x11/SDL_x11sym.h 文件,按照提示修改168行,
修改如下:
原来是:SDL_X11_SYM(int,_XData32,(Display *dpy,register long *data,unsigned len),(dpy,data,len),return)
改后添加一个单词即可:(_Xconst)
SDL_X11_SYM(int,_XData32,(Display *dpy,register _Xconst long *data,unsigned len),(dpy,data,len),return)
再make 和 sudo make install就可以了。
---------------------
作者:Juffi
来源:CSDN
原文:https://blog.csdn.net/huierlc/article/details/50165237
版权声明:本文为博主原创文章,转载请附上博文链接!
>>> import pygame
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/opt/python/lib/python2.7/site-packages/pygame-1.9.4-py2.7-linux-x86_64.egg/pygame/__init__.py", line 136, in <module>
from pygame.base import *
ImportError: /usr/local/lib/libSDL-1.2.so.0: undefined symbol: _XGetRequest
find / -name libSDL-1.2.so.0
/usr/local/lib/libSDL-1.2.so.0
/usr/lib64/libSDL-1.2.so.0
/root/hy/SDL-1.2.14/build/.libs/libSDL-1.2.so.0
cd /usr/local/lib/
rm -f libSDL-1.2.so.0
ln -s /usr/lib64/libSDL-1.2.so.0 libSDL-1.2.so.0