安裝openwrt的編譯環境

1.openwrt

 

搭建編譯環境
應用程序--附件--終端
sudo apt-get update      (更新)
安裝編譯需要的組件:
sudo apt-get install gcc 
sudo apt-get install g++ 
sudo apt-get install binutils 
sudo apt-get install patch 
sudo apt-get install bzip2 
sudo apt-get install flex 
sudo apt-get install bison 
sudo apt-get install make 
sudo apt-get install autoconf 
sudo apt-get install gettext 
sudo apt-get install texinfo 
sudo apt-get install unzip 
sudo apt-get install sharutils 
sudo apt-get install subversion 
sudo apt-get install libncurses5-dev 
sudo apt-get install ncurses-term 
sudo apt-get install zlib1g-dev 
sudo apt-get install gawk
sudo apt-get install asciidoc
sudo apt-get install libz-dev

安裝過程中主要有個g++很難裝,看了好多資料,才發現,ubuntu只能裝4.7版本

sudo apt-get install g++-4.7

sudo apt-get install g++這句話安裝是不行的,會出現問題的

The following packages have unmet dependencies:
 g++ : Depends: g++-4.8 (>= 4.8.1-4~) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

sudo apt-get install g++-4.7

這句話就可以,但是後來發現還不行,得連接一下才行。

先找一下g++-4.7

whereis g++-4.7
再將/usr/bin/g++連接到g++4.7

sudo ln -s /usr/bin/g++-4.7 /usr/bin/g++

發佈了66 篇原創文章 · 獲贊 10 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章