After a few days of tossing, and finally ran up on Ubuntu Luci, during which encountered a variety of compilation problems and dependency problems. In addition, some of the company's website can not be downloaded, so some code can not download, Luci installation process is mainly done at home. The installation process is documented below.
1. Ubuntu Virtual machine Installation and configuration
The first step of course is to install the virtual machine, my system is ubuntu-14.04.2-desktop-i386, is http://mirrors.ustc.edu.cn/ubuntu-releases/14.04/
This is a download source of hkust, download speed is very fast, faster than in the official website. I used the UBUNTU12 version, but in compiling Luci always reported various errors, and finally with this ubuntu14 success.
After installing the virtual machine to configure a good network, so that it can surf the Internet, the specific method does not say, paste two configuration samba and ssh posts.
Configuring Samba http://blog.chinaunix.net/uid-25508271-id-212620.html
Configuring SSH http://jingyan.baidu.com/article/9c69d48fb9fd7b13c8024e6b.html
2. Install Lua
Lua had to use version 5.1, tried 5.2 and 5.3, and found a link error, because some data structure names for 5.2 and 5.3 changed ...
I download the LUA source installation, enter the command to download the source wget www.lua.org/ftp/lua-5.1.5.tar.gz
Next, install the Libreadline library, which will be used when compiling LUA, and enter the command sudo apt-get install Libreadline-dev.
Then there is the installation of the Libncurses library, which is also LUA-dependent, and the input command sudo apt-get install Libncurses-dev
Next, unzip Lua and execute make Linux & make install Lua
Also to install the Liblua library, enter the command sudo apt-get install liblua5.1
3. Install SVN
When compiling the Luci code, use the SVN command to download the UHTTPD code.
Input command sudo apt-get install subversion
4. Installing MiniUPnP and MiniDLNA
These two things are to be used to run Luci, also first loaded, enter the command
sudo apt-get install MiniUPnP
sudo apt-get install MiniDLNA
5. Download Luci Source code
git clone https://github.com/openwrt/luci.git
Then go to the Luci directory to execute the command git checkout luci-0.12
And the following two commands
git checkout 89678917~1 contrib/package/luci/makefile
git checkout 89678917~1 modules/admin-full/src/luci-bwc.c
6. Compiling Luci Source code
Execute command Make RUNUHTTPD
If all goes well, enter 192.168.0.103:8080 in the browser at this time to enter the Luci Web interface. Here 192.168.0.103 is the IP address of the virtual machine.
============================, I'm a split ============================================.
Below is a list of some of the error messages recorded throughout the process.
GCC-O2-WALL-DLUA_USE_LINUX-C-O lua.o lua.c
In file included from lua.h:16:0,
From lua.c:15:
Luaconf.h:275:31:fatal error:readline/readline.h:no such file or directory
FIX: $ sudo apt-get install Libreadline-dev
MAKE[2]: Entering directory '/HOME/ROBIN/LUA-5.1.5/SRC '
GCC-O2-WALL-DLUA_USE_LINUX-C-O lua.o lua.c
Gcc-o Lua LUA.O liblua.a-lm-wl,-e-ldl-lreadline-lhistory-lncurses
/usr/bin/ld:cannot find-lncurses
Collect2:error:ld returned 1 exit status
FIX: sudo apt-get install Libncurses-dev
MAKE[1]: Entering directory '/home/robin/luci/contrib/uhttpd '
SVN Co svn://svn.openwrt.org/openwrt/branches/backfire/package/uhttpd/src uhttpd-src
MAKE[1]: Svn:command not found
FIX: sudo apt-get install subversion
[Email protected]:~/luci$ make
Makefile:1: Build/config.mk:no such file or directory
Make: * * * No rule to make target ' build/config.mk '. Stop.
FIX: Git checkout luci-0.12
MAKE[1]: Entering directory '/home/robin/luci/modules/admin-full '
Rm-f SRC/*.O SRC/LUCI-BWC
Gcc-o2--std=gnu99-wall-pedantic-fpic-c-o src/luci-bwc.o src/luci-bwc.c
Src/luci-bwc.c:35:20:fatal error:iwinfo.h:no such file or directory
#include <iwinfo.h>
FIX: Git checkout 89678917~1 contrib/package/luci/makefile
git checkout 89678917~1 modules/admin-full/src/luci-bwc.c
/home/robin/luci/host/www/cgi-bin/luci:no such file or directory
FIX: sudo apt-get install liblua5.1
Ubuntu installation Luci