Fedora 8 安装MyEclipse出现java: xcb_xlib.c:52: xcb_xlib_unlock: Assertion `c->xlib.lock’ failed.问题的解决方法
第一种解决方法:
java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock’ failed.
这是JDK导致的问题
解决办法:
还原到F7的libX11
rpm -e –nodeps libX11-1.1.3-4.fc8
rpm -e –nodeps libX11-devel-1.1.3-4.fc8
到http://rpm.pbone.net/找到下面那两个包,装上
rpm -ivh libX11-1.0.3-8.fc7.i386.rpm –该软件在http://rpm.pbone.net/index.php3?stat=26&dist=53&size=814567&name=libX11-1.0.3-8.fc7.i386.rpm
rpm -ivh libX11-devel-1.0.3-8.fc7.i386.rpm –该软件在http://rpm.pbone.net/index.php3?stat=26&dist=53&size=680199&name=libX11-devel-1.0.3-8.fc7.i386.rpm
再加上下面两行到 /etc/yum.conf,防止更新linux的时候又恢复到新版本
# List of packages to exclude from updates or installs
exclude=libX11 libX11-devel
首先看报错的信息:
[root@icnote eclipse]# ./MyEclipse_6_0_1GA_E3_3_1_Installer.bin
Preparing to install…
Extracting the JRE from the installer archive…
Unpacking the JRE…
Extracting the installation resources from the installer archive…
Configuring the installer for this system’s environment…
Launching installer…
java: xcb_xlib.c:50: xcb_xlib_unlock: Assertion `c->xlib.lock’ failed.
已放弃
[root@icnote eclipse]#
这个问题,官方解释这是由于使用了XCB而不是LibX的缘故,关键就在于assert时,Lock问题。一种解决方案是回去使用libx,另一种则是去掉assert时的检查。今天在linuxsir上看到有人用f9 了,突然想,是不是官方有对xlib的解决方案呢 ?所以update一下:
[root@icnote eclipse]# yum –enablerepo=development update libxcb –注意这里,这是安装libxcb-devel-1.1-1.fc9.i386.rpm软件
–其实也可以本地安装,# yum localinstall libxcb-devel-1.1-1.fc9.i386.rpm 该软件在http://rpm.pbone.net/index.php3?stat=26&dist=32&size=127269&name=libxcb-devel-1.1-1.fc9.i386.rpm
Loading “fastestmirror” plugin
Loading mirror speeds from cached hostfile
development 100% |=========================| 2.1 kB 00:00
primary.sqlite.bz2 100% |=========================| 5.4 MB 00:17
freshrpms 100% |=========================| 2.1 kB 00:02
Fedora 100% |=========================| 2.1 kB 00:00
livna 100% |=========================| 2.1 kB 00:00
updates 100% |=========================| 2.3 kB 00:00
livna-source 100% |=========================| 1.9 kB 00:00
Setting up Update Process
Resolving Dependencies
–> Running transaction check
–> Processing Dependency: libxcb = 1.0-3.fc8 for package: libxcb-devel
—> Package libxcb.i386 0:1.1-1.fc9 set to be updated
–> Running transaction check
—> Package libxcb-devel.i386 0:1.1-1.fc9 set to be updated
–> Finished Dependency Resolution
Dependencies Resolved
=============================================================================
Package Arch Version Repository Size
=============================================================================
Updating:
libxcb i386 1.1-1.fc9 development 124 k
Updating for dependencies:
libxcb-devel i386 1.1-1.fc9 development 124 k
Transaction Summary
=============================================================================
Install 0 Package(s)
Update 2 Package(s)
Remove 0 Package(s)
Total download size: 248 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): libxcb-devel-1.1-1 100% |=========================| 124 kB 00:01
(2/2): libxcb-1.1-1.fc9.i 100% |=========================| 124 kB 00:00
Running rpm_check_debug
Running Transaction Test
Finished Transaction Test
Transaction Test Succeeded
Running Transaction
Updating : libxcb ######################### [1/4]
Updating : libxcb-devel ######################### [2/4]
Cleanup : libxcb ######################### [3/4]
Cleanup : libxcb-devel ######################### [4/4]
Updated: libxcb.i386 0:1.1-1.fc9
Dependency Updated: libxcb-devel.i386 0:1.1-1.fc9
Complete!
[root@icnote eclipse]# export LIBXCB_ALLOW_SLOPPY_LOCK=1 –注意这里,也可以export LIBXCB_ALLOW_SLOPPY_LOCK=true
然后:
[root@icnote eclipse]# ./MyEclipse_6_0_1GA_E3_3_1_Installer.bin
Preparing to install…
Extracting the JRE from the installer archive…
Unpacking the JRE…
Extracting the installation resources from the installer archive…
Configuring the installer for this system’s environment…
Launching installer…
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb7f8d777]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb7f8d8d1]
#2 /usr/lib/libX11.so.6(_XReply+0xff) [0xa9c12f]
#3 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/xawt/libmawt.so [0xb1abbd3e]
#4 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/xawt/libmawt.so [0xb1aa5d47]
#5 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/xawt/libmawt.so [0xb1aa5ec3]
#6 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0xb1aa6106]
#7 [0xb2c3798d]
#8 [0xb2c31b3b]
#9 [0xb2c31b3b]
#10 [0xb2c2f217]
#11 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/client/libjvm.so [0xb795fd8c]
#12 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/client/libjvm.so [0xb7a73fd8]
#13 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/client/libjvm.so [0xb795fbbf]
#14 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb79bd34d]
#15 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb77aa2cd]
#16 [0xb2c372de]
#17 [0xb2c31a64]
#18 [0xb2c2f217]
#19 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/client/libjvm.so [0xb795fd8c]
Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb7f8d777]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_lock+0x2e) [0xb7f8d83e]
#2 /usr/lib/libX11.so.6 [0xa9b168]
#3 /usr/lib/libX11.so.6(XGetVisualInfo+0x26) [0xa91d36]
#4 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/xawt/libmawt.so [0xb1aa5089]
#5 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/xawt/libmawt.so [0xb1aa52d3]
#6 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/xawt/libmawt.so [0xb1aa5f71]
#7 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x26) [0xb1aa6106]
#8 [0xb2c3798d]
#9 [0xb2c31b3b]
#10 [0xb2c31b3b]
#11 [0xb2c2f217]
#12 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/client/libjvm.so [0xb795fd8c]
#13 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/client/libjvm.so [0xb7a73fd8]
#14 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/client/libjvm.so [0xb795fbbf]
#15 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/client/libjvm.so(JVM_DoPrivileged+0x32d) [0xb79bd34d]
#16 /tmp/install.dir.32564/Linux/resource/jre/lib/i386/libjava.so(Java_java_security_AccessController_doPrivileged__Ljava_security_PrivilegedAction_2+0x3d) [0xb77aa2cd]
#17 [0xb2c372de]
#18 [0xb2c31a64]
#19 [0xb2c2f217]
[root@icnote eclipse]#
成功.