在ubuntu环境下编译LUCI

来源:互联网 发布:win7网卡mac地址修改 编辑:程序博客网 时间:2024/05/17 05:14

官网上介绍的步骤:http://luci.subsignal.org/trac/wiki/Documentation/DevelopmentEnvironmentHowTo

1、Required Software

Make sure you have the following software installed on your host machine:

  • GCC, Make (build-essential)
  • Lua 5.1.x + development headers (lua5.1liblua5.1-0-dev)
2、Getting the source code
The current stable release is luci-0.10. You can checkout the release via SVN with:
svn co http://svn.luci.subsignal.org/luci/branches/luci-0.10
OR
You can checkout the current working branch with:
svn co http://svn.luci.subsignal.org/luci/trunk
3、Running LuCI
make runhttpd
prepares and compiles LuCI and its dependencies and finally starts the LuCI webserver under  http://localhost:8080/luci.
make run
gives you an overview over other possible run-targets.
4、Writing Code
While writing code make sure you do not edit any files in the dist-directory of any module or the global host directory. Changes there will be lost as soon as you rerun make. Instead change the files in theluasrcroot, ... directories of the modules and rerun make if you want to test your changes.

下面是重点:经过上面的步骤可能会报错undefined reference to `crypt'
The changes below should do it
$ cat contrib/uhttpd/uhttpd-src/Makefile |grep -A 1 -n compile:72:compile: $(OBJ) $(TLSLIB) $(LUALIB)73-    $(CC) -o uhttpd $(LDFLAGS) $(OBJ) $(LIB)$ cat modules/admin-full/Makefile | grep -A 1 -n compile:13:compile: build-clean $(BWC_OBJ)14-    $(LINK) -o src/$(BWC_BIN) $(BWC_OBJ) $(BWC_LDFLAGS)

$ cat libs/nixio/Makefile | grep -A 1 -n compile92:compile: $(NIXIO_OBJ)93-    $(LINK) $(SHLIB_FLAGS) -o src/$(NIXIO_SO) $(NIXIO_OBJ) $(NIXIO_LDFLAGS_POST) $(NIXIO_LDFLAGS)

经过上面两个步骤的修改应该就能解决问题,看到下面这张光明的界面。


原创粉丝点击