linux gcc降版本

转载:https://www.programering.com/a/MDMyMTMwATI.html

Because matlab R2012a GCC version 4.4, in order to keep the Ubuntu GCC version of the same to compile, so to install the gcc-4.4 version. The following only records the installation error solution:

1 check /etc/apt/sources.list and sudo

sudo gedit /etc/apt/sources.list

2 add the following code to the file:

# stable
deb http://ftp.de.debian.org/debian/ sarge main contrib non-free
deb-src http://ftp.de.debian.org/debian/ sarge main contrib non-free
deb http://ftp.de.debian.org/debian-non-US/ sarge/non-US main contrib non-free
deb-src http://ftp.de.debian.org/debian-non-US/ sarge/non-US main contrib non-free

The 3 Update

sudo apt-get update

4 installation of GCC and g++

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

 

 转载:https://blog.youkuaiyun.com/hunter___/article/details/89306778 

解决"package gcc-4.4 is not available, but is referred to by another package"方法:

1.sudo vim /etc/apt/sources.list

在最后添加:

# stable add by , in order to install g++4.4
deb http://dk.archive.ubuntu.com/ubuntu/ trusty main universe
 
2.history 如下:

 
 2046  sudo vim /etc/apt/sources.list
 2047  sudo apt update 
 2048  sudo apt-get install gcc-4.4 g++-4.4 g++-4.4-multilib
 
 2050  g++ -v
 
 2057  cd ../bin/
 2058  ls g++*
 2059  ls g++* -l
 2060  sudo mv g++ g++.bak
 2061  ls g++* -l
 2062  ls gcc* -l
 2063  sudo mv gcc gcc.bak
 2064  ls gcc* -l
 2065  sudo ln -s g++-4.4 g++
 2066  ls g++* -l
 2067  sudo ln -s gcc-4.4 gcc
 2068  ls gcc* -l
 

降版本成功:

 


 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值