我昨天安装了Ubuntu 14.04(Trusty Tahr).一切似乎都好.但是当我尝试编译一些C代码时,遇到以下错误.该错误似乎是由于操作系统缺乏32位架构支持.错误输出如下:
/usr/bin/ld: i386 architecture of input file `./libsc.a(ftl_msg.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `./libsc.a(libsc_debug.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `./libsc.a(libsc_str.o)' is incompatible with i386:x86-64 output
/usr/bin/ld: i386 architecture of input file `./libsc.a(libsc_cfg_common.o)' is incompatible with i386:x86-64 output
Run Code Online (Sandbox Code Playgroud)
我曾经apt-get install ia32-libs
在使用Ubuntu 12.04(精确穿山甲)时.但据我所知,自Ubuntu 13.10(Saucy Salamander)以来,Ubuntu已经删除了ia32-libs.我该如何解决这个问题?
Mik*_*der 140
您可以尝试这个来安装32位库(不是所有在ia32-libs中):
sudo apt-get install program:i386
Run Code Online (Sandbox Code Playgroud)
sudo dpkg --add-architecture i386
可能是必需的(如果你还没有运行过).
或者,如果您想要安装整个ia32-lib,请尝试以下顺序:
sudo -i
cd /etc/apt/sources.list.d
echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get update
apt-get install ia32-libs
Run Code Online (Sandbox Code Playgroud)
PS:通过这种方式,您可以安装ia32-libs
.但是,我们添加了13.04的源代码,因此,可能存在一些未知问题.安装后ia32-libs
,我建议你删除ia32-libs-raring.list
in /etc/apt/sources.list.d
,并做sudo apt-get update
.
如果您想修复Android SDK的依赖关系,可以尝试以下方法:
sudo apt-get install -y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1
小智 77
安装gcc多个库.
sudo apt-get install gcc-multilib
Run Code Online (Sandbox Code Playgroud)
Ale*_*sei 56
我见过的最好的答案是如何在Ubuntu 64位上运行32位应用程序?
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386
sudo ./adb
Run Code Online (Sandbox Code Playgroud)
and*_*der 29
我终于明白了!这是我的方式,我希望它可以帮助你:)
sudo apt-get install libc6:i386
sudo -i
cd /etc/apt/sources.list.d
echo "deb http://old-releases.ubuntu.com/ubuntu/ raring main restricted universe multiverse" >ia32-libs-raring.list
apt-get update
apt-get install ia32-libs
rm /etc/apt/sources.list.d/ia32-libs-raring.list
apt-get update
exit
sudo apt-get install gcc-multilib
Run Code Online (Sandbox Code Playgroud)
我不知道我需要安装这些的原因,但它可以在我的电脑上运行.完成这些软件包的安装后,就该尝试了.哦,是的,我需要告诉你.当你想编译代码这个时候,你应该添加-m32
之后gcc
,例如:gcc -m32 -o hello helloworld.c
.只是make clean
和make
试.祝你好运的朋友.
PS:我的环境是:Ubuntu 14.04 64位(Trusty Tahr)和GCC 4.8.4版.我已经在我的博客中写了解决方案,但它是中文:-) - 如何在ubuntu14.04下指南针32bit程序.
wis*_*cky 20
这些替代库对我有用:
sudo apt-get update
sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0 lib32stdc++6
Run Code Online (Sandbox Code Playgroud)
Bob*_*Bob 17
我遇到了与上面相同的问题,Eclipse建议安装:
Hint: On 64-bit systems, make sure the 32-bit libraries are installed:
"sudo apt-get install ia32-libs"
or on some systems,
"sudo apt-get install lib32z1"
Run Code Online (Sandbox Code Playgroud)
当我尝试安装ia32-libs时,Ubuntu提示安装其他三个软件包:
$ sudo apt-get install ia32-libs
Reading package lists... Done
Building dependency tree
Reading state information... Done
Package ia32-libs is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
lib32z1 lib32ncurses5 lib32bz2-1.0
E: Package 'ia32-libs' has no installation candidate
$
$ sudo apt-get install lib32z1 lib32ncurses5 lib32bz2-1.0
Run Code Online (Sandbox Code Playgroud)
使用Android Studio和intellij,我还必须安装32位版本的libstdc ++ 6:
sudo apt-get install lib32stdc++6
Run Code Online (Sandbox Code Playgroud)
对我来说,我必须跑
sudo dpkg --add-architecture i386
Run Code Online (Sandbox Code Playgroud)
在运行Mike Tang的回答之前.否则,我无法安装ia32-libs.
归档时间: |
|
查看次数: |
412627 次 |
最近记录: |