在ubuntu环境下编译LUCI

官网上介绍的步骤: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 compile
92:compile: $(NIXIO_OBJ)
93-    $(LINK) $(SHLIB_FLAGS) -o src/$(NIXIO_SO) $(NIXIO_OBJ) $(NIXIO_LDFLAGS_POST) $(NIXIO_LDFLAGS)

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


你可能感兴趣的:(ubuntu)