编译python elfclass32_libxcb-render-util.so.0: wrong ELF class: ELFCLASS32解决办法

今天运行飞鸽传书时报错:

libxcb-render-util.so.0: wrong ELF class: ELFCLASS32

明显是链接库libxcb-render-util.so.0不正确,我是64位系统,这个库文件却是32位的,去/usr/lib找了一下,确实有这个文件,但是是32位的,需要安装一个64位的。但是一直在想apt-get怎么安装这个库,试了apt-get install xorg-dev都不行,后来发现,居然是apt-get install libxcb-render-util,反正就是按tab键就出来了,接下来也出现了类似报错,缺啥补啥。

还有一个报错

./QIpmsg: error while loading shared libraries: libxcb-sync.so.1: cannot open shared object file: No such file or directory

这里我也找不到 libxcb-sync.so.1这个库,但是有个libxcb-sync.so.0.0.0,于是建了个libxcb-sync.so.1的软链接,指向libxcb-sync.so.0.0.0

能运行了,也没发现什么问题,只是不能中文切换输入法,这个很蛋疼。

补充一下,飞鸽传书是用QT写的,QtGui 和 QtWidgets 会对xcb库有依赖。

libfontconfig1-dev

libfreetype6-dev

libx11-dev

libxext-dev

libxfixes-dev

libxi-dev

libxrender-dev

libxcb1-dev

libx11-xcb-dev

libxcb-glx0-dev

Additionally, if you do not configure with -qt-xcb, you should also install these development packages:

libxcb-keysyms1-dev

libxcb-image0-dev

libxcb-shm0-dev

libxcb-icccm4-dev

libxcb-sync0-dev

libxcb-xfixes0-dev

libxcb-shape0-dev

libxcb-randr0-dev

libxcb-render-util0-dev

因此执行:

sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev  libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev libx11-xcb-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev

sudo apt-get install libfontconfig1-dev libfreetype6-dev libx11-dev

libxext-dev libxfixes-dev libxi-dev libxrender-dev libxcb1-dev

libx11-xcb-dev libxcb-glx0-dev libxcb-keysyms1-dev libxcb-image0-dev

libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync0-dev libxcb-xfixes0-dev

libxcb-shape0-dev libxcb-randr0-dev libxcb-render-util0-dev

apt-get install libxcb-render-util0:i386 libxcb-image0:i386 libxcb-icccm4:i386 libxcb-xfixes0:i386 libxcb-randr0:i386 libxcb-shape0:i386  libxcb-shm0:i386 libxcb-keysyms1:i386

参考

xcb官网:xcb.freedesktop.org

ubuntu软件包 http://packages.ubuntu.com/

阅读(10983) | 评论(0) | 转发(0) |

你可能感兴趣的:(编译python,elfclass32)