久久精品精选,精品九九视频,www久久只有这里有精品,亚洲熟女乱色综合一区
    分享

    如何通過PPA安裝/升級gcc和g++版本到4.8.1 (Ubuntu 12.04, 13.04, 10.04適用)

     追潮者 2016-07-23

    gcc 4.8.1 是第一個完全支持C++11 的編譯器。下文是如何在Ubuntu 12.04, Ubuntu 13.04 或 Ubuntu 12.10中通過PPA安裝GCC 4.8的步驟。PPA為Ubuntu用戶提供了GCC 4.7.3 和 GCC 4.8.1兩個版本。在Ubuntu12.04 LTS默認安裝的是gcc4.6.3,該版本只支持部分c++11的特性,可以通過增加“-std=c++0x" 編譯選項來使用這些特性,但是對多線程庫的支持較差。你可以參考下文的步驟,來升級系統中的gcc,g++版本。


    安裝步驟:

    1) Ctrl+Alt+T打開終端,執行如下命令adding PPA to your repositories:

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


    2) 安裝gcc 4.8 和 g++ 4.8

    test@test:/install$ sudo apt-get update; sudo apt-get install gcc-4.8 g++-4.8


    3) 裝完后,依次執行如下命令將系統默認的gcc,g++編譯器版本設置為4.8版本

    test@test:/install$ sudo update-alternatives --remove-all gcc

    update-alternatives: error: no alternatives for gcc.

    test@test:/install$ sudo update-alternatives --remove-all g++

    update-alternatives: error: no alternatives for g++.

    test@test:/install$ sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 20

    update-alternatives: using /usr/bin/gcc-4.8 to provide /usr/bin/gcc (gcc) in auto mode.

    test@test:/install$ sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 20

    update-alternatives: using /usr/bin/g++-4.8 to provide /usr/bin/g++ (g++) in auto mode.

    test@test:/install$ sudo update-alternatives --config gcc

    There is only one alternative in link group gcc: /usr/bin/gcc-4.8

    Nothing to configure.

    test@test:/install$ sudo update-alternatives --config g++

    There is only one alternative in link group g++: /usr/bin/g++-4.8

    Nothing to configure.


    4) 安裝完畢。現在你的系統中已經默認使用gcc 4.8和g++ 4.8了。通過如下命令查看:

    test@test:/install$ g++ --version

    g++ (Ubuntu 4.8.1-2ubuntu1~12.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.


    test@test:/install$ gcc --version

    gcc (Ubuntu 4.8.1-2ubuntu1~12.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:///index.php/2013/08/install-gcc-4-8-via-ppa-in-ubuntu-12-04-13-04/

      本站是提供個人知識管理的網絡存儲空間,所有內容均由用戶發布,不代表本站觀點。請注意甄別內容中的聯系方式、誘導購買等信息,謹防詐騙。如發現有害或侵權內容,請點擊一鍵舉報。
      轉藏 分享 獻花(0

      0條評論

      發表

      請遵守用戶 評論公約

      類似文章 更多

      主站蜘蛛池模板: 国产偷国产偷亚洲清高APP| 中国女人熟毛茸茸A毛片| 香港日本三级亚洲三级| 人妻少妇456在线视频| 亚洲AV区无码字幕中文色| 国产高清一区二区不卡| 老子午夜精品无码| 欧美野外伦姧在线观看| 免费人成视频网站在线18| 精品久久久久久无码国产 | 成人久久免费网站| 亚洲人成网站18禁止无码| 日本边添边摸边做边爱的视频| 国产精品福利自产拍久久 | 国精品无码一区二区三区在线蜜臀| 无码人妻丝袜在线视频| 丁香婷婷激情俺也去俺来也| 真人性囗交视频| 亚洲色大成永久WW网站| 久久午夜无码鲁丝片直播午夜精品| 国产线观看免费观看| 中文字幕日韩有码一区| 中文字幕一卡二卡三卡| 国产不卡av一区二区| 夜夜躁狠狠躁日日躁| 野外做受三级视频| 草草浮力影院| 欧美一进一出抽搐大尺度视频| 久女女热精品视频在线观看| 久久精品无码免费不卡| 67194熟妇在线直接进入| 人妻少妇精品中文字幕| 色综合AV综合无码综合网站 | 97精品亚成在人线免视频| 亚洲成人四虎在线播放| 日本不卡一区二区三区| 久久精品蜜芽亚洲国产AV| 麻豆国产成人AV在线播放| 日产一二三四乱码| 国精品无码一区二区三区在线蜜臀 | 午夜福利看片在线观看|