是否可以同时安装2个不同版本的GCC? [英] Is it possible to install 2 different versions of GCC at the same time?

查看:565
本文介绍了是否可以同时安装2个不同版本的GCC?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用Ubuntu 9.10

对于特定的一段代码,我需要GCC 3.2,但我的版本更高。是否可以安装多个版本并使用我想要的?

解决方案

你有没有



如果gcc 3.3是好的,你可以下载gcc-3.3和相关的.deb软件包,我猜想它会安装并且愉快地与你用业力获得的gcc 4.4共存。 (您必须确保将其作为gcc-3.3调用。)



否则,您必须:


  • 下载相关的gcc源码包

  • 使用installdir自行构建它,如/opt/gcc-3.3

  • 确保在需要时正确设置PATH。


I am using Ubuntu 9.10
For a particular piece of code I require GCC 3.2 but I have a higher version. Is it possible to install multiple versions and use whichever one I want to ?

解决方案

Have you searched the Ubuntu package archive for gcc ?

If gcc 3.3 is ok, you could download the gcc-3.3 and related .deb packages for dapper and I suspect it will install and happily co-exist with the gcc 4.4 you get with karmic. (You'll have to be sure to invoke it as gcc-3.3.)

Otherwise you would have to:

  • download the relevant gcc source bundle
  • build it yourself with an installdir some place out of the way like /opt/gcc-3.3
  • make sure to set your PATH correctly when you need it.

这篇关于是否可以同时安装2个不同版本的GCC?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆