Fedora27安装wxPython2.8.12.1时遇到的问题及解决

在Fedora27上安装wxPython2.8.12.1时,可能遇到wxWidgets配置错误、GTK+依赖问题以及编译错误。解决方法包括下载wxWidgets,创建安装目录,安装必要的开发库如gtk2-devel、mesa-libGL-devel和mesa-libGLU-devel,然后进行编译。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

1.下载wxWidgets:https://sourceforge.net/projects/wxpython/files/wxPython/2.8.12.1/

wxwidgets2.8_2.8.12.1.orig.tar.gz

wxPython2.8-2.8.12.1-1.src.rpm

创建安装目录:

mkdir -p /usr/local/wx/2.8

2.解压之后,进入wxwidgets目录

 ./configure --prefix=/usr/local/wx/2.8 --with-gtk --enable-gtk2 --enable-unicode 


可能会出现的问题:

*** Could not run GTK+ test program, checking why...
*** The test program failed to compile or link. See the file config.log for the
*** exact error that occured. This usually means GTK+ is incorrectly installed.
configure: error:
The development files for GTK+ were not found. For GTK+ 2, please
ensure that pkg-config is in the path and that
gtk+-2.0.pc
is
installed
. For GTK+ 1.2 please check that gtk-config is in the path,
and that the version is 1.2.3 or above. Also check that the
libraries returned by 'pkg-config gtk+-2.0 --libs' or 'gtk-config
--libs' are in the LD_LIBRARY_PATH or equivalent.

尝试的操作:

yum -y install gtk2-devel binutils-devel

可能出现的问题:

configure: error: OpenGL libraries not available
尝试的操作:

yum install mesa-libGL-devel

yum install mesa-libGLU-devel

3.编译:

make

出现的问题:

make: *** [Makefile:11973:.pch/wxprec_basedll/wx/wxprec.h.gch] 错误 127




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值