如何在Ubuntu 14.04中安装ia32

编程入门 行业动态 更新时间:2024-10-28 07:25:23
如何在Ubuntu 14.04中安装ia32-libs LTS(Trusty Tahr)(How to install ia32-libs in Ubuntu 14.04 LTS (Trusty Tahr))

我昨天安装了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

当我使用Ubuntu 12.04(Precise Pangolin)时,我习惯于apt-get install ia32-libs 。 但是我知道的是Ubuntu已经从Ubuntu 13.10(Saucy Salamander)中删除了ia32-lib。 如何解决这个问题?

I installed Ubuntu 14.04 (Trusty Tahr) yesterday. Everything seems OK. But when I tried to compile some C code, I encounter the following error. The error seems to be due to the OS lacking the 32-bit architecture support. The error output is as following:

/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

I used to apt-get install ia32-libs when I was using Ubuntu 12.04 (Precise Pangolin). But what I know is that Ubuntu has removed the ia32-libs since Ubuntu 13.10 (Saucy Salamander). How can I fix this problem?

最满意答案

您可以尝试安装32位库(并非全部在ia32-libs中):

apt-get install program: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

PS:这样,你可以安装ia32-libs 。 但是,我们添加13.04的来源,所以可能有一些未知的问题。 安装ia32-libs ,建议您删除/etc/apt/sources.list.d中的ia32-libs-raring.list ,然后执行sudo apt-get update 。


如果您想修复Android SDK的依赖关系,可以尝试以下方法:

sudo apt-get install -y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1

You can try this to install the 32-bit library (not all in ia32-libs):

sudo apt-get install program:i386

sudo dpkg --add-architecture i386 may be required (if you haven't ever run that).


Or if you want to install the whole ia32-lib instead, try the following order:

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

PS: In this way, you can install ia32-libs. However, we add the source of 13.04 instead, so, there may be some unknown problem. After installing ia32-libs, I recommend you to remove the ia32-libs-raring.list in /etc/apt/sources.list.d, and do sudo apt-get update.


If you want to fix the dependency of Android SDK, you can try this bellow:

sudo apt-get install -y libc6-i386 lib32stdc++6 lib32gcc1 lib32ncurses5 lib32z1

更多推荐

本文发布于:2023-08-03 07:42:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1385213.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何在   Ubuntu

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!