记录一下刷完 OpenWrt 固件系统后出现的问题和解决方法,之前用我的京东云无线宝一代刷了一个OpenWrt 固件系统,但是发现重启不了系统,因此今天重新刷了一个 OpenWrt 固件。记录一下刷完后发现了一些问题和解决方法以供有需要的同学使用。京东云无线宝一代刚刷写完成 OpenWrt 固件后,在软件包点“刷新列表”后,长时间无响应,刷新页面在点“刷新列表”后,提示 Collected errors: * opkg_conf_load: Could not lock /var/lock/opkg.lock: Resource temporarily unavailable,以下内容为软件源配置和错误解决方法。
解决方法打开SSH工具连接路由器,输入以下命令:
echo "nameserver 119.29.29.29">/tmp/resolv.conf rm -f /var/lock/opkg.lock opkg update
或
echo "nameserver 114.114.114.114">/tmp/resolv.conf rm -f /var/lock/opkg.lock opkg update
或者在后台加入一些自定义OpenWrt源,“系统”˃“软件包”˃“配置”,修改发行版软件源
清华大学:mirrors.tuna.tsinghua.edu.cn/openwrt
中科大:mirrors.ustc.edu.cn/openwrt
腾讯:mirrors.cloud.tencent.com/openwrt
阿里:https://mirrors.aliyun.com/openwrt/releases
下面以openwrt 22.03.2为例子:
清华大学OpenWrt源
src/gz openwrt_core https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.2/targets/x86/64/packages src/gz openwrt_base https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.2/packages/x86_64/base src/gz openwrt_luci https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.2/packages/x86_64/luci src/gz openwrt_packages https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.2/packages/x86_64/packages src/gz openwrt_routing https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.2/packages/x86_64/routing src/gz openwrt_telephony https://mirrors.tuna.tsinghua.edu.cn/openwrt/releases/22.03.2/packages/x86_64/telephony
中科大OpenWrt源
src/gz openwrt_core http://mirrors.ustc.edu.cn/openwrt/releases/22.03.2/targets/x86/64/packages src/gz openwrt_base http://mirrors.ustc.edu.cn/openwrt/releases/22.03.2/packages/x86_64/base src/gz openwrt_luci http://mirrors.ustc.edu.cn/openwrt/releases/22.03.2/packages/x86_64/luci src/gz openwrt_packages http://mirrors.ustc.edu.cn/openwrt/releases/22.03.2/packages/x86_64/packages src/gz openwrt_routing http://mirrors.ustc.edu.cn/openwrt/releases/22.03.2/packages/x86_64/routing src/gz openwrt_telephony http://mirrors.ustc.edu.cn/openwrt/releases/22.03.2/packages/x86_64/telephony
腾讯OpenWrt源
src/gz openwrt_core https://mirrors.cloud.tencent.com/openwrt/releases/22.03.2/targets/x86/64/packages src/gz openwrt_base https://mirrors.cloud.tencent.com/openwrt/releases/22.03.2/packages/x86_64/base src/gz openwrt_luci https://mirrors.cloud.tencent.com/openwrt/releases/22.03.2/packages/x86_64/luci src/gz openwrt_packages https://mirrors.cloud.tencent.com/openwrt/releases/22.03.2/packages/x86_64/packages src/gz openwrt_routing https://mirrors.cloud.tencent.com/openwrt/releases/22.03.2/packages/x86_64/routing src/gz openwrt_telephony https://mirrors.cloud.tencent.com/openwrt/releases/22.03.2/packages/x86_64/telephony
阿里OpenWrt源
src/gz openwrt_core https://mirrors.aliyun.com/openwrt/releases/22.03.2/targets/x86/64/packages src/gz openwrt_base https://mirrors.aliyun.com/openwrt/releases/22.03.2/packages/x86_64/base src/gz openwrt_luci https://mirrors.aliyun.com/openwrt/releases/22.03.2/packages/x86_64/luci src/gz openwrt_packages https://mirrors.aliyun.com/openwrt/releases/22.03.2/packages/x86_64/packages src/gz openwrt_routing https://mirrors.aliyun.com/openwrt/releases/22.03.2/packages/x86_64/routing src/gz openwrt_telephony https://mirrors.aliyun.com/openwrt/releases/22.03.2/packages/x86_64/telephony
然后又发现一个问题,点击后台功能的时候会出现以下提示,并且无法登录OpenWrt后台管理页面
/usr/lib/lua/luci/util.lua:627: Unable to establish ubus connection
stack traceback:
[C]: in function ‘assert’
/usr/lib/lua/luci/util.lua:627: in function ‘ubus’
/usr/lib/lua/luci/dispatcher.lua:177: in function ‘session_retrieve’
/usr/lib/lua/luci/dispatcher.lua:378: in function ‘dispatch’
/usr/lib/lua/luci/dispatcher.lua:126: in function </usr/lib/lua/luci/dispatcher.lua:125>
这个问题的解决方法就是,不要挂载内部存储,就不会出现这个问题。
如果都无法解决你换个OpenWrt固件吧