getlibs: 在Debian和Ubuntu下的二进制安装包,下载地址:
http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs-all.deb
源码(SHELL脚本):http://www.boundlesssupremacy.com/Cappy/getlibs/getlibs
安装32位二进制软件包(非lib库):
sudo dpkg -i --force-all package_name.deb
GetLibs的使用方法:
下载和安装一个软件所需的所有libs:
getlibs /usr/bin/skype
通过lib名将一个32位库安装在64位系统上:(-l参数)
getlibs -l libogg.so.0 libSDL-1.2.so.0
通过软件包名安装32位的库:(-p参数)
getlibs -p libqt4-core libqt4-gui
安装一个32位lib的.deb文件:(-i参数)
getlibs -i ~/i386_library_1.deb
下载和安装一个32位lib文件:(-w参数)
getlibs -w http://mirrors.kernel.org/ubuntu/pool/main/s/sdl-image1.2/libsdl-image1.2_1.2.5-3_i386.deb
其他参数解释:
--apt-file : Uses apt-file to find the packagenames for libraries. The default uses packages.ubuntu.com. This is especially useful for non-ubuntu users.
--build : converts a 32-bit package to a 64-bit package and installs it. This will only install libraries from a 32-bit package into the correct place! This will not install any binaries from that package! This is very beta.
--savebuild : use with --build. Saves new 64-bit package to /home/$USER
--mirror or -m : Use the specified mirror to download from if one is not specified for package
--verbose : Extra output
--ldconfig : Runs ldconfig on directories where new libraries are installed
-64 : Will let apt-get install 64-bit packages for a 64-bit system
-32 : Left only for compatibility with getlibs v1. 32-bit library installation is the default for all systems.
--distro : can set as either Ubuntu or Debian. Ubuntu installs to /usr/lib32 and/or /lib32. Debian installs to /emul/ia32-linux/
--release : can set as hardy gutsy feisty edgy or dapper. Determines what web interface release is used in search.
首先要解决的问题就是64位系统必须安装32位的支持库才能达到向下的兼容。在Windows中,32位支持是直接集成,所以可以直接安装运行32位的软件。Linux下面只要安装32位支持库,同样可以兼容32位软件,Ubuntu为例:
终端命令:
sudo apt-get install ia32-libs //安装32位支持库(大概60多兆吧)
sudo dpkg --force-architecture -i xxxx.deb //加上--force-architecture参数,来安装位x86构架编译的deb包
卸载的话用 sudo dpkg -P 软件名,例如:sudo dpkg -P opera
PS. 在执行 sudo apt-get install ia32-libs 终端命令时可能会出现报错:
ERROR:
E: 无法获得锁 /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)E: 无法锁定管理目录(/var/lib/dpkg/),是否有其他进程正占用它?
刚开始我也遇到了这样的问题,这是因为进程被占用,如下终端命令即可解决:
sudo rm /var/cache/apt/archives/lock
sudo rm /var/lib/dpkg/lock