2013年3月15日 星期五

gdb: error while loading shared libraries: libexpat.so.0: cannot open shared object file: No such file or directory @ Ubuntu 12.04 Server 64Bit

原先以為安裝 libexpat1-dev 後即可解決,但有更多細節該留意,就順手記一下吧


$ sudo find / -name "libexpat.so*"
/lib/x86_64-linux-gnu/libexpat.so.1.5.2
/lib/x86_64-linux-gnu/libexpat.so.1
$ sudo ln -s /lib/x86_64-linux-gnu/libexpat.so.1 /lib/i386-linux-gnu/libexpat.so.0
$ sudo ldconfig
$ gdb
gdb: error while loading shared libraries: libexpat.so.0: wrong ELF class: ELFCLASS64
$ sudo apt-get install ia32-libs
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:


The following packages have unmet dependencies:
ia32-libs : Depends: ia32-libs-multiarch
E: Unable to correct problems, you have held broken packages.
$ dpkg --print-architecture
amd64
$ dpkg --print-foreign-architectures
i386
$ sudo unlink /lib/i386-linux-gnu/libexpat.so.0
$ sudo apt-get install libexpat1-dev:i386
$ sudo ln -s /lib/i386-linux-gnu/libexpat.so.1 /lib/i386-linux-gnu/libexpat.so.0
$ gdb

(gdb)


沒有留言:

張貼留言