簡介
有些軟件比較新,需要更高的gcc版本,所以需要升級gcc。編譯安裝比較耗時,所以直接選擇bin包就好。
步驟
添加源
1 sudo add-apt-repository ppa:ubuntu-toolchain-r/test 2 sudo apt-get update
安裝依賴的包(出現錯誤才需要這個)
1 sudo apt-get install software-properties-common
升級安裝
1 sudo apt-get install gcc-5 g++-5
更新鏈接
1 sudo ln -s /usr/bin/gcc-5 /usr/bin/gcc -f 2 sudo ln -s /usr/bin/g++-5 /usr/bin/g++ -f
查看版本
參考
http://www.cnblogs.com/BlackStorm/p/5183490.html
http://www.cnblogs.com/loveidea/p/4384837.html