安装openwrt的编译环境

来源:互联网 发布:野风 林忆莲 知乎 编辑:程序博客网 时间:2024/05/22 10:28

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++

0 0
原创粉丝点击