./arch/x86/include/asm/bug.h:35:22error: expected identifier or ‘(’ before string constant、 如何升級gcc

ubuntu安裝wifi網卡過程遇到的。

經測試是gcc版本(5.4)太低,直接升級到9.3.

添加源:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test
sudo apt-get update
sudo apt-get install gcc-9 g++-9
#原版本 設定20爲優先級
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 20 
#新版本 設定50爲優先級,高於20
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 50 

以上。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章