一、安装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. OpenFOAM——三角腔驱流

    本算例来自<ANSYS Fluid Dynamics Verification Manual>中的VMFL011: Laminar Flow in a Triangular Cavity ...

  2. 龙贝格积分(c++)

    用龙贝格算法计算积分 #include <iostream> #include<cmath> #include <iomanip> using namespace  ...

  3. @DateTimeFormat 和 @JsonFormat 注解

    1. 准备 定义一个pojo,它有一个 java.util.Date 类型的属性 date. import java.util.Date; public class DateVo { private ...

  4. Server 2003 操作系统位数

    安装好电脑系统,如何查看windows 2003/xp/win7是64位还是32位? 方法/步骤 第一种方法:桌面上鼠标右键单击“计算机”(我的电脑) 在弹出的快捷菜单中选择“属性”,如果看到64的字 ...

  5. spring boot eclipse 远程调试

    <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot ...

  6. php常用命令

    --------------------------------------------------------------- 重启phpservice php-fpm restart ------- ...

  7. oracle远程连接服务器

    一.需要下载的工具 1.PLSQL Developer 下载及安装地址如下: http://www.zdfans.com/html/18196.html 2.下载instantclient-basic ...

  8. FFMPEG Tips 如何提取码流的基本信息

    原文连接: https://zhuanlan.zhihu.com/p/23448271 1. 码流中的哪些信息值得关注 ? [ ] 是否包含:音频.视频 [ ] 码流的封装格式 [ ] 视频的编码格式 ...

  9. MSYS2 更新源

    博客转载自:https://blog.csdn.net/puputaoexin/article/details/81780492 在使用msys2下载文件的时候回出现下载速度奇慢,且经常因为各种原因报 ...

  10. PHP 相关性系数计算

    相关系数公式 参考:https://baike.baidu.com/item/相关系数 PHP 实现代码 public static function calc($list) { $cv = []; ...