Linux 如何在 Ubuntu 11.10 上安装 gcc 4.4.6

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/10506158/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-06 06:14:26  来源:igfitidea点击:

How to install gcc 4.4.6 on Ubuntu 11.10

linuxgccubuntux86-64

提问by MetallicPriest

I have read that GCC 4.4.6 is packaged in the Ubuntu release 11.10 (Oneiric). My question is how to install it using apt-get because apt-get install gcc446doesn't work neither apt-get install gcc44.

我读过 GCC 4.4.6 打包在 Ubuntu 版本 11.10 (Oneiric) 中。我的问题是如何使用 apt-get 安装它,因为apt-get install gcc446两者都不起作用apt-get install gcc44.

回答by MetallicPriest

It installed successfully with the following command.

它使用以下命令成功安装。

sudo apt-get install gcc-4.4

回答by Jony

step 1: sudo apt-get install build-essential

第 1 步:sudo apt-get install build-essential

Step 2: sudo apt-get install gcc-4.4

第 2 步:sudo apt-get install gcc-4.4

Step 3: Check the installed version by sudo gcc -v

第 3 步:通过 sudo gcc -v 检查已安装的版本

回答by Anshul Garg

There's a metapackage called build-essential which should install the compiler and a bunch of related/needed packages:

有一个名为 build-essential 的元包,它应该安装编译器和一堆相关/需要的包:

sudo apt-get install build-essential

The suggestion to first do sudo apt-get update is sound, this will update package lists and all versions should match nicely.

首先执行 sudo apt-get update 的建议是合理的,这将更新包列表并且所有版本都应该很好地匹配。

That is, however, if you didn't modify your /etc/apt/sources.listfile manually. If so, then maybe some of the changes you made or repositories you added contain conflicting packages which cause the problems you see. If that's the case, please look at the file and fix the troublesome entries. Of course, if you want help doing so, you can post your sources.listfile (or any fragments in /etc/apt/sources.list.d) and maybe someone can help you fix them.

但是,如果您没有/etc/apt/sources.list手动修改文件。如果是这样,那么您所做的某些更改或您添加的存储库中可能包含导致您看到的问题的冲突包。如果是这种情况,请查看文件并修复麻烦的条目。当然,如果您需要帮助,您可以发布您的sources.list文件(或 中的任何片段/etc/apt/sources.list.d),也许有人可以帮助您修复它们。