一、安装gcc 4.7

Ubuntu14.04自带的gcc版本是4.8,MATLAB2014a支持的最高版本为4.7x。因此,需要安装gcc4.7,并给gcc降级

在终端执行gcc 4.7的安装命令:

sudo apt-getupdate

sudo apt-get install gcc-4.7 g++-4.7 g++-4.7-multilib gcc-4.7-multilib

在终端执行以下系统gcc降级命令(其中数字越大,表示优先级越高):

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.7 100

sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.7 100

sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50

sudo update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.7 100

sudo update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.8 50

验证gcc-4.7是否安装并成为系统的默认版本:

g++ -v

选择gcc或者g++:

sudo update-alternatives --config gcc

ubuntu gcc 降级 适应matlab的更多相关文章

  1. GCC降级

    前阵子将Ubuntu升级到了12.04,原来装得virtualbox也可以正常使用.后来几次内核升级之后,virtualbox突然不能用了.virtualbox提示进行/etc/init.d/vbox ...

  2. Ubuntu gcc错误:对'log'等函数未定义的引用

    Ubuntu gcc错误:对'log'等函数未定义的引用 a.c #include <stdio.h>#include <math.h>int main(){    float ...

  3. Ubuntu 16.04安装Matlab 2016b教程

    由于代码需要依赖Linux环境,只好尝试着装MATLAB,然而各种问题接踵而至,开始了由MATLAB引发的三天Linux探寻之旅-- 下载Matlab 2016b for Linux https:// ...

  4. ubuntu 16.04 安装 Matlab R2016b后启动出现的问题

    (1)报以下错误: License checkout failed.License Manager Error -95MATLAB is unable to connect to the licens ...

  5. Ubuntu 18.04 gcc降级为4.8.5版本

    1. 下载gcc/g++ 4.8 $ sudo apt-get install -y gcc-4.8.5 $ sudo apt-get install -y g++-4.8.5 2.  链接gcc/g ...

  6. Ubuntu gcc缺失问题

    在安装redis过程中,需要使用make编译源码,但发现linux中缺失gcc,系统为Ubuntu12. 一般情况下,可使用sudo apt-get install gcc或者sudo apt-get ...

  7. Ubuntu gcc编译报错:format ‘%llu’ expects argument of type ‘long long unsigned int’, but argument 2 has type ‘__time_t’ [-Wformat=]

    平时用的都是Centos系统,今天偶然在Ubuntu下编译了一次代码,发现报错了: 源码: #include <stdio.h> #include <sys/time.h> # ...

  8. Ubuntu 16.04LTS 安装 MATLAB 2014B

    环境:Ubuntu 16.04LTS 软件:MATLAB 2014B MATLAB 2014B 下载地址(带Crack): 链接: https://pan.baidu.com/s/1nvGtmEd 密 ...

  9. ROS_Kinetic_16 ubuntu中安装使用Matlab和ROS

    ROS_Kinetic_16 ubuntu(16.04)中安装使用Matlab(2015b)和ROS(kinetic) 参考网址:http://cn.mathworks.com/hardware-su ...

随机推荐

  1. tomcat启动报错java.lang.OutOfMemoryError:PermGen space解决办法

    tomcat启动错误提示: 严重: Error waiting for multi-thread deployment of WAR files to completejava.util.concur ...

  2. scrapy+splash 爬取京东动态商品

    作业来源:https://edu.cnblogs.com/campus/gzcc/GZCC-16SE1/homework/3159 splash是容器安装的,从docker官网上下载windows下的 ...

  3. 配置mongo.conf文件

    配置mongo.conf文件,优化mongod.exe的启动 在d:/Develop/MongoDB目录下创建mongo.conf文件并写入:   dbpath=d:\Develop\MongoDB\ ...

  4. 服务器推送(Server push)技术总结

    1. 短轮询 ajax按一定间隔去请求 2. 长轮询(long Polling) Long Polling的实现很简单,可分为四个过程: 发起Polling发起Polling很简单,只需向服务器发起请 ...

  5. CentOS离线状态下安装Python3.7.0

    1.下载python安装包以及依赖的包 python安装包:Python-3.7.0 下载地址:www.python.org/ftp/python/3.7.0/Python-3.7.0.tar.xz ...

  6. GitLab - 一些基础使用

    1 - GitLab角色权限 1.1 组(同一组成员的行为权限) 管理员创建不同的分组,然后设定分组的负责人(Owner) Owner可以添加组员,为组创建项目,指定项目的负责人 项目负责人可以添加项 ...

  7. VS2010 C#添加水晶报表及设计

    添加并设计水晶报表. [1]在VS中添加水晶报表 右击项目-->添加-->组件-->Crystal Report,输入文件名称“CrystallistReport”,如下图所示: 此 ...

  8. mysql杂项

    取数据库某个表中的所有的字段 select COLUMN_NAME from information_schema.COLUMNS where table_name = 'your_table_nam ...

  9. 【VS开发】MFC动态设置对话框属性 弹出或嵌入

    参考: MFC的对话框CDialog是怎么控制窗口可调整大小的属性的呢?打开资源文件,对话框资源的属性列表中,有一个"Border"项,改变该项的值就可以改变窗口边框风格.实际上w ...

  10. Form表单验证组件

    Tyrion是一个基于Python实现的支持多个WEB框架的Form表单验证组件,其完美的支持Tornado.Django.Flask.Bottle Web框架.Tyrion主要有两大重要动能: 表单 ...