ubuntu 如何安装32位兼容库

121 views
Skip to first unread message

hui zhang

unread,
Oct 7, 2014, 12:22:29 AM10/7/14
to ustc...@googlegroups.com
ubuntu 如何安装32位兼容库,没这些库好些软件装不上
ia32-libs 貌似已经废弃了
网上有加老版本源得解决办法
没尝试过

有没有什么标准得解决办法。

Zihao Wang

unread,
Oct 7, 2014, 12:27:02 AM10/7/14
to ustc...@googlegroups.com
参考:
https://wiki.debian.org/Multiarch/HOWTO

简单的说就是:
dpkg --add-architecture i386
apt-get update
apt-get install package:i386

Sent from Mailbox


--
-- 来自USTC LUG
请使用gmail订阅,不要灌水。
更多信息more info:http://groups.google.com/group/ustc_lug?hl=en?hl=en

---
You received this message because you are subscribed to the Google Groups "USTC_LUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ustc_lug+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

hui zhang

unread,
Oct 7, 2014, 1:11:36 AM10/7/14
to ustc...@googlegroups.com
问题是我不清楚要装哪些依赖
比如下个 steam游戏
貌似只有32位的
提示我 依赖 ia32-libs


在 2014年10月7日星期二UTC+8下午12时27分02秒,Zihao Wang写道:

hui zhang

unread,
Oct 27, 2014, 10:41:46 AM10/27/14
to ustc...@googlegroups.com
如果是deb包  该如何安装呢
类似 ppstream  或者 115 网盘的deb

在 2014年10月7日星期二UTC+8下午12时27分02秒,Zihao Wang写道:

Dev Wong

unread,
Oct 27, 2014, 10:52:16 AM10/27/14
to ustc...@googlegroups.com
dpkg --add-architecture i386
apt-get update

然后这样安装
Simply add :i386 to the name of the package you would like to install.

For example, I needed a 32 bit version of Java 7 and could install it (along with all its dependencies) simply by running:

sudo apt-get install openjdk-7-jdk:i386
不知道deb包依赖能否自动解决…我安装wps时…是手动找出它的依赖安装的…

Dev Wong

unread,
Oct 27, 2014, 10:56:43 AM10/27/14
to ustc...@googlegroups.com
咦?我记得我好像在哪里回复过…原来就是在这里呀…
deb安装包里有依赖信息,解压了一个.deb格式的包,在DEBIAN目录下的control文件有一行Depends: ,这里列出来的大概就是依赖

2014-10-27 22:41 GMT+08:00 hui zhang <fastf...@gmail.com>:

hui zhang

unread,
Oct 27, 2014, 9:00:23 PM10/27/14
to ustc...@googlegroups.com
能举例说明么
不应该用dpkg 安装么
apt-get 当然可以安装    
但是对于源外面的deb 怎么装



You received this message because you are subscribed to a topic in the Google Groups "USTC_LUG" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ustc_lug/wJ1mZSz2MDM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ustc_lug+u...@googlegroups.com.

Zihao Wang

unread,
Oct 27, 2014, 9:09:42 PM10/27/14
to ustc...@googlegroups.com
Ubuntu的话,deb文件直接双击不就打开一个窗口可以点击安装么?用命令的话我记得是dpkg -i xxx.deb

依赖的包如果源里有的话可以用apt-get安装;如果下载.deb文件安装的话,用图形界面或者dpkg。


Sent from Mailbox

hui zhang

unread,
Oct 27, 2014, 9:12:46 PM10/27/14
to ustc...@googlegroups.com
dpkg --add-architecture i386
apt-get update
dpkg -i ppstream.deb
这样32位依赖库 会自动装上么
上述操作后pps 依旧用不了

hui zhang

unread,
Oct 27, 2014, 9:14:15 PM10/27/14
to ustc...@googlegroups.com
网上还有很多这样只有32位软件 的debian 包   有的还依赖老的ia32-libs 
怎么破

Zihao Wang

unread,
Oct 27, 2014, 9:16:10 PM10/27/14
to ustc...@googlegroups.com
dpkg -i的时候有什么提示?成功了么?
pps应该敲什么命令打开?在终端敲这个命令是什么输出?找不到命令还是提示缺少库什么的?


Sent from Mailbox

ytz...@gmail.com

unread,
Oct 27, 2014, 9:17:24 PM10/27/14
to ustc...@googlegroups.com
dpkg 似乎不会自动解决依赖。‎安装 .deb 之后试试 sudo apt-get install -f

Sent from my BlackBerry 10 smartphone.
From: hui zhang
Sent: 2014年10月28日星期二 9:12
Subject: Re: [USTC-LUG] ubuntu 如何安装32位兼容库

Zhang Cheng

unread,
Oct 27, 2014, 9:17:30 PM10/27/14
to USTC LUG
你的问题,简单的回答:很难。如果你没有足够的功底,基本不可能自行解决这个问题。

最初你发邮件时我本来想回复的,但是看到有人很快回了,并且提到了关键字multiarch,我就没有回复。

这里,我稍微科普一下multiarch这个东西吧。

64位下面运行64位程序和32位程序都是没有问题的,但是32位程序依赖的所有库也都必须是32位的。在有multiarch之前,系统里很难同时安装32位和64位的库文件,因为他们安装的路径都完全相同(一般都是 /usr/lib/[$name]/libxxx.so[.$ver.$ver...]这种格式),所以不能同时安装。于是就有人出来维护了一个ia32-libs的包,这个包里包含了大多数常用库的32位版本,放到了一个独立的目录下。可是,这种方式有许多问题,最大的一个问题是,它只能包含常用的库,不可能把所有库都包含进去,此外如果其中有一个库需要升级,那么就不得不更新整个包,非常浪费客户端更新的流量。

于是,开发者们想出了multiarch的方法,在启用了multiarch的系统下,支持multiarch的包不同架构的文件会放到不同的目录下面,即 /usr/lib/$arch/ 下面,比如64位的放在了 /usr/lib/x86_64-linux-gnu/ 下面。这样之后,在一个系统下面就可以同时安装多个架构的库文件(甚至不能运行的,比如在x86系统上可以安装mips的库)。因此,在启用了multiarch的系统中,ia32-libs 这个包也就完成了历史使命了。大家可以各取所需了。

在multiarch之前,一个32位程序要打包给64位的系统使用,就需要依赖ia32-libs库,而有了multiarch之后就不需要了,依赖该怎么写怎么写,你要哪个库就依赖哪个库好了。楼主这里拿到的包依赖ia32-libs,说明这个包是很早以前打的,或者是为没有multiarch的系统打的。在支持multiarch的系统上就无法安装了。如果官方不提供新的包的话,自己安装只有一个方法,把这个包拆开来,修改依赖关系,重新打包。这个对于新手来说难度稍有一些大。(其实也不是那么大。)
--
Cheng,
Best Regards

hui zhang

unread,
Oct 27, 2014, 9:29:16 PM10/27/14
to ustc...@googlegroups.com

http://stackoverflow.com/questions/23182765/how-to-install-ia32-libs-in-ubuntu-14-04-lts

没试过

那对于非 ia32-lib
的软件怎么安装呢。
好些 软件都是这样 115pan    ppstream 等



You received this message because you are subscribed to a topic in the Google Groups "USTC_LUG" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ustc_lug/wJ1mZSz2MDM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ustc_lug+u...@googlegroups.com.

Zhang Cheng

unread,
Oct 27, 2014, 9:32:07 PM10/27/14
to USTC LUG
不推荐这里面提供的方式,这里的方式相当于加一个旧的(而且已经不再被支持的)版本的仓库,并安装这里面的ia32-libs包,这可能导致潜在的问题。用我以前最喜欢说的一句话:如果你不知道你在干什么,那么最好不要干,除非你准备好了这次探险。

Zihao Wang

unread,
Oct 27, 2014, 9:38:55 PM10/27/14
to ustc...@googlegroups.com
非ia32是最好的,用multiarch呀,你试了吗?遇到了什么问题?(细节,终端输出是什么)


Sent from Mailbox

Zhang Cheng

unread,
Oct 27, 2014, 9:40:26 PM10/27/14
to USTC LUG

2014-10-28 9:38 GMT+08:00 Zihao Wang <wzh...@gmail.com>:
非ia32是最好的,用multiarch呀,你试了吗?遇到了什么问题?(细节,终端输出是什么)

​楼主的问题是,他从网上下了一个包,这个包里依赖ia32-libs,但是系统里没有这个包,就酱。

这种情况下除了重新打包,无解。​



--
Cheng,
Best Regards

Zihao Wang

unread,
Oct 27, 2014, 9:49:33 PM10/27/14
to ustc...@googlegroups.com
楼主刚才又问:
“ 那对于非ia32-lib的软件怎么安装呢。
好些软件都是这样 115pan   ppstream 等”

楼主,你到底哪个包有问题…它依赖ia32还是一般的32位的库…还是百度搜到的教程提示你安装ia32…

楼主你之前提到steam游戏,steam游戏在steam客户端里点安装就可以了,不用系统那一套软件包管理器,不需要用户手动解决依赖,而且steam对最新版Ubuntu的支持肯定不差…


Sent from Mailbox


--

hui zhang

unread,
Oct 27, 2014, 11:16:04 PM10/27/14
to ustc...@googlegroups.com
楼主遇到的不是一个问题 
是一系列问题
举例
http://gamux.org/  上有很多游戏    大部分是32位的    
有些  deb安装时就会提示依赖  ia32-libs  
有些安装时不提示,但是运行时发现找不到32bit库

同样的问题我在安装ppstream 和 115pan的时候也遇到了

所以想找一个通用解决方案。


You received this message because you are subscribed to a topic in the Google Groups "USTC_LUG" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ustc_lug/wJ1mZSz2MDM/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ustc_lug+u...@googlegroups.com.

SJ Zhu

unread,
Oct 27, 2014, 11:20:22 PM10/27/14
to ustc...@googlegroups.com

这个问题zhang cheng已经说的很清楚了。
ia32-libs是以前用的,现在没有了

你现在有两种办法,
一,用旧版系统
二,重新为这些软件打包,使其不再依赖ia32-libs,而使用multilib

另外的方法或许能解决,但都是不适合的

Zhang Cheng

unread,
Oct 27, 2014, 11:21:20 PM10/27/14
to USTC LUG

2014-10-28 11:16 GMT+08:00 hui zhang <fastf...@gmail.com>:
楼主遇到的不是一个问题 
是一系列问题
举例
http://gamux.org/  上有很多游戏    大部分是32位的    
有些  deb安装时就会提示依赖  ia32-libs  
有些安装时不提示,但是运行时发现找不到32bit库

同样的问题我在安装ppstream 和 115pan的时候也遇到了

所以想找一个通用解决方案。

​简单的回答你,multiarch跟ia32-libs可以认为是不兼容的(虽然同时存在问题也不大,但是没有人维护这个东西,也没有人会对他俩的兼容性做保证,同时ia32-libs已经不会被更新了,里面的许多库有可能已经过时),所以这两类的包不太可能在同一个系统上安装,除非你非常了解细节,将依赖ia32-libs的包都拆解、修改依赖、重新打包,这是一个通用的解决方案,但不是不简单。​



--
Cheng,
Best Regards

hui zhang

unread,
Oct 27, 2014, 11:23:19 PM10/27/14
to ustc...@googlegroups.com
thanks
这个重新打包过程 
不知道好不好搞

有人成功安装过 32bit   ppstream 或者 115盘么

--
-- 来自USTC LUG
请使用gmail订阅,不要灌水。
更多信息more info:http://groups.google.com/group/ustc_lug?hl=en?hl=en

---

Zhang Cheng

unread,
Oct 27, 2014, 11:25:46 PM10/27/14
to USTC LUG

2014-10-28 11:23 GMT+08:00 hui zhang <fastf...@gmail.com>:
thanks
这个重新打包过程 
不知道好不好搞

有人成功安装过 32bit   ppstream 或者 115盘么

​你提供几个下载链接,我看看能否写一个通用的脚本一键转。​



--
Cheng,
Best Regards

Zihao Wang

unread,
Oct 27, 2014, 11:28:11 PM10/27/14
to ustc...@googlegroups.com
依赖ia32-libs的包相比可以用multiarch的包多了重新打包的步骤…
如果说要一种方法解决这两种情况的话,我想到几种方式:安装32位系统、在虚拟机里安装32位系统、配置chroot的32位系统、在容器里配置32位系统…


Sent from Mailbox

Zhang Cheng

unread,
Oct 27, 2014, 11:30:40 PM10/27/14
to USTC LUG

2014-10-28 11:28 GMT+08:00 Zihao Wang <wzh...@gmail.com>:
依赖ia32-libs的包相比可以用multiarch的包多了重新打包的步骤…
如果说要一种方法解决这两种情况的话,我想到几种方式:安装32位系统、在虚拟机里安装32位系统、配置chroot的32位系统、在容器里配置32位系统…

​安装32位的系统不能解决这个问题,因为依赖ia32-libs这个包,32位的系统里也没有这个包。
这里的根本问题并不是这东西安装后不能运行,而是由于系统无法满足“依赖ia32-libs这个包”的条件,而无法安装这个包。​



--
Cheng,
Best Regards

Zihao Wang

unread,
Oct 27, 2014, 11:34:09 PM10/27/14
to ustc...@googlegroups.com
我的意思是这些原生不支持64位的软件,它们大概提供了原生支持32位的安装包,可以安装在32位系统


Sent from Mailbox


You received this message because you are subscribed to the Google Groups "USTC_LUG" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ustc_lug+u...@googlegroups.com.

hui zhang

unread,
Oct 28, 2014, 12:12:24 AM10/28/14
to ustc...@googlegroups.com

hui zhang

unread,
Oct 28, 2014, 2:01:43 AM10/28/14
to ustc...@googlegroups.com
转一个 64bit 装 32 bit couter strike的文档
基本思想是缺什么, 根据提示安装什么
libgtk
libstdc++
libGL
等等 

另外 ppstream 太老了, 恐怕不好维护, 不要费力装了
115 内部是打包了 32位lib的  不能用恐怕是别的原因 我再看看。

 
----------------------------------------------------------------------------------------------------
首先必须启动multiarch,以及安装一些32位的库。
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libgtk2.0-0:i386
cd 到游戏目录

chmod +x css.sh
chmod +x hl2.sh
chmod +x hl2_linux

sh ./css.sh
此时提示:error while loading shared libraries: libstdc++.so.6: cannot open shared object file: No such file or directory

(apt安装推荐新手)
32位
sudo apt-get install libstdc++6
64位 
sudo apt-get install libstdc++6:i386

32/64位的统一解决办法:(推荐有一定经验的用户,假如你知道export LD_LIBRARY_PATH这个东西的话)
进入packages.ubuntu.com(debian请进入packages.debian.org)。在Search the contents of packages的下面的输入框输入libstdc++.so.6,查找到很多包内都含有这个库,下载一个32位的,比如libstdc++6 [除 amd64] 或 lib32stdc++6等等,一定要下32位的

点入之后,有个下载项,硬件架构选择i386,选就近的服务器。点击下载即可

下载好deb包后,右击在此解压,或解压到这里(不同文件管理器叫法不一样)
进入解压好的文件夹的usr/lib里,如果还有子目录继续进入,直到看到有libstdc++.so.6等文件。将里面的所有依赖库和文件夹(如果有),比如这里就是复制libstdc++.so.6和libstdc++.so.6.0.18,复制到css游戏目录的bin目录,

然后再次运行 sh ./css.sh
,此时你会发现提示变了,变成了SDL_GL_LoadLibrary(NULL) failed: Failed loading libGL.so.1: libGL.so.1: 无法打开共享对象文件: 没有那个文件或目录
采用如上方法继续解决依赖即可,貌似一共就缺少3、4个依赖,不会花很大功夫。
再次强调,依赖都是32位的!!!

另外经过验证,开源驱动也是可以运行游戏的,不过如果最后出现如下信息
PROBLEM: You appear to have OpenGL 1.4.0, but we need at least 2.0.0!
Could not find required OpenGL entry point 'glGetError'! Either your video card is unsupported, or your OpenGL driver needs to be updated.
那你只能自己想办法升级OpenGL或者使用闭源驱动了

hui zhang

unread,
Oct 28, 2014, 2:04:16 AM10/28/14
to ustc...@googlegroups.com
关于缺少 ia32-libs的 是否可以  强制安装  然后用上面方法继续
请大神指示

Zhang Cheng

unread,
Oct 28, 2014, 2:05:19 AM10/28/14
to USTC LUG

2014-10-28 14:04 GMT+08:00 hui zhang <fastf...@gmail.com>:
关于缺少 ia32-libs的 是否可以  强制安装  然后用上面方法继续
请大神指示

​如果你有办法让dpkg给你安装上的话​,你可以试试。



--
Cheng,
Best Regards

hui zhang

unread,
Oct 28, 2014, 2:06:13 AM10/28/14
to ustc...@googlegroups.com
改 debian/control  depend 重新打包可以吗

--

Zhang Cheng

unread,
Oct 28, 2014, 2:06:23 AM10/28/14
to USTC LUG

2014-10-28 14:01 GMT+08:00 hui zhang <fastf...@gmail.com>:
转一个 64bit 装 32 bit couter strike的文档

​转文档时请一定带上原始url。不仅是对别人负责,也是对你自己负责,对你自己来说,你给出url之后相当于免责了,如果有人照你转发的内容操作除了问题,那么责任是原作者的。如果你不贴原始链接,那么责任就是你的。​



--
Cheng,
Best Regards

hui zhang

unread,
Oct 28, 2014, 2:08:22 AM10/28/14
to ustc...@googlegroups.com

--

Zhang Cheng

unread,
Oct 28, 2014, 2:11:39 AM10/28/14
to USTC LUG
​这两个包本身都是32位的包,并且都不依赖ia32-libs,系统里添加386的arch之后就可以正常安装了。​



--
Cheng,
Best Regards

hui zhang

unread,
Oct 28, 2014, 2:12:46 AM10/28/14
to ustc...@googlegroups.com
thx
我回去试试

--

hui zhang

unread,
Oct 28, 2014, 7:56:13 AM10/28/14
to ustc...@googlegroups.com
bash: /usr/bin/115pan: No such file or directory

运行了几个32位程序 都是这个问题
难道要装个32位bash

--

hui zhang

unread,
Oct 28, 2014, 9:17:01 AM10/28/14
to ustc...@googlegroups.com
64位开启兼容32位的命令
dpkg --print-foreign-architectures

sudo dpkg --add-architecture i386

sudo apt-get update
sudo apt-get dist-upgrade


看到个这么搞的
这样动作会不会太大
有什么影响没?
有些我只装 libc:i386就搞定了

Reply all
Reply to author
Forward
0 new messages