Ubuntu 11.10 GCC4.5 GCC4.6无缝切换
来源:互联网 发布:js广告代码生成器 编辑:程序博客网 时间:2024/06/06 15:42
Step1: 检查版本和安装的版本
lee@lee:~$ ls /usr/bin/gcc*
/usr/bin/gcc /usr/bin/gcc-4.5 /usr/bin/gcc-4.6
如果缺4.5那么就安装哈。
sudo apt-get install gcc-4.5 g++-4.5
g++ -v
gcc -v
Step2:增加可选项
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.5 40
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 30
sudo update-alternatives --config gcc
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.5 40
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 30
sudo update-alternatives --config g++
如果想删除可选项:
sudo update-alternatives --remove gcc /usr/bin/gcc-4.5
Step3:检查当前版本
g++ -v
gcc -v
- Ubuntu 11.10 GCC4.5 GCC4.6无缝切换
- Ubuntu 11.10 GCC4.5 GCC4.6无缝切换
- Ubuntu 11.10 GCC4.5 GCC4.6无缝切换
- Ubuntu 11.10 GCC4.5 GCC4.6无缝切换
- Ubuntu 11.10 GCC4.5 GCC4.6无缝切换
- Ubuntu 11.10 GCC4.5 GCC4.6无缝切换
- Ubuntu 安装GCC4.8
- GCC4.6升级到GCC4.8
- Ubuntu14下gcc4.8和gcc4.7之间的切换
- ubantu安装gcc4.6
- 编译GCC4.5
- 编译GCC4.5
- gcc4.5编译
- .ubuntu 10.04 安装 gcc4.6.1
- Ubuntu 10.04下 GCC4.7
- Ubuntu 13.04 安装 GCC4.8.1
- Ubuntu中编译GCC4.9.0
- RHEL5.6安装GCC4.4.3
- LDA模型学习(代码)
- NSNotificationCenter
- ACdream 某群赛某题 Classification of the species
- 语言模型训练工具SRILM详解
- 状态模式
- Ubuntu 11.10 GCC4.5 GCC4.6无缝切换
- 工作习惯
- Can't open and lock privilege tables: Table 'mysql.host' doesn't exist 问题的解决方法
- 安装qt5后编译运行后有关Qt at-spi的警告
- 契约优先方式编写wsdl + 隐式Header
- 【文章】在安达信的日子
- exit,return,_exit3者的区别
- mysql不写binlog
- CentOS+Nginx+PHP+MySQL详细配置(图解)