日韩av黄I国产麻豆传媒I国产91av视频在线观看I日韩一区二区三区在线看I美女国产在线I麻豆视频国产在线观看I成人黄色短片

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 >

ubuntu12.04默认gcc4.6.3,如何升级到gcc4.8

發布時間:2025/3/21 42 豆豆
生活随笔 收集整理的這篇文章主要介紹了 ubuntu12.04默认gcc4.6.3,如何升级到gcc4.8 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

之前所有在12.04上面的工作 對于gcc版本沒有特殊要求,最近ORBSLAM2要求支持C++11.

今天安裝SDL明確要求GCC4.8以上版本,否則出現錯誤。

這里記錄升級方法:? http://blog.csdn.net/linsanhua/article/details/38047559

?

1.) Press?Ctrl+Alt+T?on your keyboard to open terminal. When it opens, run below commands to add the ppa:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test

2.) Then install gcc 4.8 and g++ 4.8:

sudo apt-get update; sudo apt-get install gcc-4.8 g++-4.8

3.) Once installed, run following commands one by one to use gcc 4.8 instead of previous version.

sudo update-alternatives --remove-all gcc sudo update-alternatives --remove-all g++sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20sudo update-alternatives --config gccsudo update-alternatives --config g++

Now you have the?gcc 4.8 with c++11 complete feature?in your system. Check out by:

gcc --version

gcc (Ubuntu 4.8.1-2ubuntu1~13.04) 4.8.1
Copyright (C) 2013 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

http://ubuntuhandbook.org/index.php/2013/08/install-gcc-4-8-via-ppa-in-ubuntu-12-04-13-04/

總結

以上是生活随笔為你收集整理的ubuntu12.04默认gcc4.6.3,如何升级到gcc4.8的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。