ubuntu 下单独编译openwrt luci

先安装git或者subversion

sudo apt-get install git subversion
安装编译需要的库

apt-get install g++ libncurses5-dev zlib1g-dev bison flex unzip autoconf gawk make gettext gcc binutils patch bzip2 libz-dev 
sudo apt-get install build-essential lua5.1 liblua5.1-0-dev

下载Luci源码

git clone https://github.com/openwrt/luci.git
cd luci
git checkout luci-0.12  #获取luci-0.12分支
进入源码目录
cd luci-0.12  
编译
make runuhttpd
出错处理,如果提示找不iwinfo.h ,Make error, iwinfo.h: no such files or dir
拷贝iwinfo 和iwinfo.h到/usr/include/lua5.1/目录
sudo cp -r openwrt/package/network/utils/iwinfo/src/include/iwinfo /usr/include/lua5.1/

sudo cp openwrt/package/network/utils/iwinfo/src/include/iwinfo.h /usr/include/lua5.1/
再次
make runuhttpd

 

 
  

你可能感兴趣的:(openwrt)