Open htnghia90 opened 6 years ago
Hello @htnghia90!
Did you get some solution for that? I'm with the same issue with TP Link Archer C50.
Best regards, Jandersonti.
Dear Jandersonti,
That's problem for new version luci package at https://git.lede-project.org/project/luci.git You must build default openwrt without luci package and then install luci by command line later or you use another luci package on github. Good luck
Best regards
You need to install libuci-lua
You need to install
libuci-lua
This worked for me... similar error and this did the fix.
Hi everyone. After I build firmware tp-link archer 7. I can ssh bu port 22 but website 80 is faill. I try to install or update luci or uci. But two of them installed. Anybody know this issue, help me please /usr/lib/lua/luci/controller/admin/users.lua:7: module 'uci' not found: no field package.preload['uci'] no file './uci.lua' no file '/usr/share/lua/uci.lua' no file '/usr/share/lua/uci/init.lua' no file '/usr/lib/lua/uci.lua' no file '/usr/lib/lua/uci/init.lua' no file './uci.so' no file '/usr/lib/lua/uci.so' no file '/usr/lib/lua/loadall.so' stack traceback: [C]: in function 'require' /usr/lib/lua/luci/controller/admin/users.lua:7: in main chunk [C]: in function 'require' /usr/lib/lua/luci/dispatcher.lua:517: in function 'createindex' /usr/lib/lua/luci/dispatcher.lua:544: in function 'createtree' /usr/lib/lua/luci/dispatcher.lua:220: in function 'dispatch' /usr/lib/lua/luci/dispatcher.lua:141: in function </usr/lib/lua/luci/dispatcher.lua:140>
Here is source in /usr/lib/lua/luci/controller/admin/users.lua -- Copyright 2008 Steven Barth steven@midlink.org -- Copyright 2011-2015 Jo-Philipp Wich jow@openwrt.org -- Licensed to the public under the Apache License 2.0.
module("luci.controller.admin.users", package.seeall)
require ("uci") local usw = require "luci.users"
function index() local page local nw = require "luci.dispatcher" local user = nw.get_user() local uci = uci.cursor() local fs = require "nixio.fs"
end
local function cdate(user) local udate = nixio.fs.stat("/home/"..user) local first = os.date("%c", udate.ctime) return first end
local function adate(user) local udate = nixio.fs.stat("/home/"..user) last = os.date("%c", udate.atime) or nil return last end
local function get_shell(user) local uci = uci.cursor() local shell = uci:get("users", user, "shell") return shell end
local function get_group(user) local uci = uci.cursor() local group = uci:get("users", user, "group") return group end
function userstatus(users) local rv = { } local user for user in users:gmatch("[%w%.%-]+") do local first = cdate(user) local last = adate(user) local shell = get_shell(user) local group = get_group(user) if user then local data = { id = user, shell = shell, group = group, first = first, last = last
end if #rv > 0 then luci.http.prepare_content("application/json") luci.http.write_json(rv) return end luci.http.status(404, "No such device") end
function user_delete(user) local usw = require "luci.users" local uci = uci.cursor() local rem = uci:delete("users",user)
uci:commit("users") usw.del_user(user) luci.http.redirect(luci.dispatcher.build_url("admin/users/users")) return end