我試圖使用京東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 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