Eu estava tentando usar o JD-GUI , um programa descompilador Java gratuito, no meu laptop Fedora 20 hoje, mas eu estava rodando em um erro ao tentar executar o programa.
$ '/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
Depois de receber este erro, fui descobrir qual pacote fornece essa biblioteca.
$ 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
Eu notei que era a arquitetura de 32 bits para este pacote. Eu tenho um computador de 64 bits e estou usando a versão de 64 bits do Fedora 20. Tentei instalar a versão de 32 bits do 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
Parece que a instalação do pacote de arquitetura de 32 bits para gtk2
tem várias outras implicações. Eu estava pesquisando e encontrei um este tópico no LinuxQuestions.org, e aparentemente sua solução estava rodando yum update
e então fazendo yum install gtk2.i686
. No entanto, isso não está funcionando para mim.
Meu laptop é totalmente atualizado com todos os pacotes nos repositórios do Fedora. Meu kernel do Linux é 3.16.3-200.fc20.x86_64
.
Por fim, como posso fazer com que o JD-GUI funcione com minha máquina sem remover as bibliotecas de 64 bits? Existe uma solução alternativa para a compatibilidade dos pacotes de 64 bits / 32 bits?