无法使用 64 位共享库运行 JD-GUI,需要 32 位库

无法使用 64 位共享库运行 JD-GUI,需要 32 位库

我试图使用京东GUI,一个免费的 Java 反编译程序,今天在我的 Fedora 20 笔记本电脑上运行,但在尝试执行该程序时遇到了错误。

$ '/home/jflory/Downloads/jd-gui-0.3.5.linux.i686/jd-gui' 
/home/jflory/Downloads/jd-gui-0.3.5.linux.i686/jd-gui: error while loading shared libraries: libgtk-x11-2.0.so.0: cannot open shared object file: No such file or directory

收到这个错误后,我去查找什么包提供了这个库。

$ sudo yum whatprovides libgtk-x11-2.0.so.0
gtk2-2.24.22-2.fc20.i686 : The GIMP ToolKit (GTK+), a library for creating GUIs for X
Repo        : fedora
Matched from:
Provides    : libgtk-x11-2.0.so.0

gtk2-2.24.24-2.fc20.i686 : The GIMP ToolKit (GTK+), a library for creating GUIs for X
Repo        : updates
Matched from:
Provides    : libgtk-x11-2.0.so.0

我注意到这个包是 32 位架构的。我有一台 64 位计算机,并且使用的是 64 位版本的 Fedora 20。我尝试安装 32 位版本的gtk2.

$ sudo yum install gtk2.i686
Resolving Dependencies
--> Running transaction check
---> Package gtk2.i686 0:2.24.24-2.fc20 will be installed
[snip]
--> Running transaction check
[snip]
--> Finished Dependency Resolution

Error:  Multilib version problems found. This often means that the root
       cause is something else and multilib version checking is just
       pointing out that there is a problem. Eg.:

     1. You have an upgrade for cairo which is missing some
        dependency that another package requires. Yum is trying to
        solve this by installing an older version of cairo of the
        different architecture. If you exclude the bad architecture
        yum will tell you what the root cause is (which package
        requires what). You can try redoing the upgrade with
        --exclude cairo.otherarch ... this should give you an error
        message showing the root cause of the problem.

     2. You have multiple architectures of cairo installed, but
        yum can only see an upgrade for one of those architectures.
        If you don't want/need both architectures anymore then you
        can remove the one with the missing update and everything
        will work.

     3. You have duplicate versions of cairo installed already.
        You can use "yum check" to get yum show these errors.

   ...you can also use --setopt=protected_multilib=false to remove
   this checking, however this is almost never the correct thing to
   do as something else is very likely to go wrong (often causing
   much more problems).

   Protected multilib versions: cairo-1.12.16-1.4.i686 != cairo-1.13.1-0.1.git337ab1f.fc20.x86_64

因此,安装 32 位架构包似乎gtk2还有许多其他含义。我四处寻找并发现这个线程在 LinuxQuestions.org 上,显然他的解决方案正在运行yum update,然后执行yum install gtk2.i686.但是,这对我不起作用。

我的笔记本电脑已使用 Fedora 存储库中的所有软件包进行了全面更新。我的Linux内核是3.16.3-200.fc20.x86_64.

最终,如何在不删除 64 位库的情况下让 JD-GUI 与我的机器一起工作?是否有解决 64 位/32 位软件包兼容性的解决方法?

答案1

您好,为了解决类似问题,它帮助我首先安装 .x64 版本。

看起来 yum 正在抱怨安装的 .x64 软件包版本和您想要安装的 .i686 版本不同。

所以

sudo yum install gtk2.x86_64

sudo yum install gtk2.i686

为我工作

答案2

对我有用的是

rpm --erase --nodeps cairo

它会删除cairo包而不检查任何可能被此类操作违反的依赖项,然后

yum install cairo

它从配置的包存储库安装 cairo

相关内容