Collected errors: * opkg_conf_load: Could not lock /var/lock/opkg.lock....错误解决

作者:csuper 发表于:2024-05-14

Collected errors: * opkg_conf_load: Could not lock /var/lock/opkg.lock....错误解决

Collected errors: * opkg_conf_load: Could not lock /var/lock/opkg.lock: Resource temporarily unavailable.
在openwrt更新软件的时候出出现这个问题

Failed to download the package list from 运行也报错无法找到软件包!
Collected errors: * opkg_conf_load: Could not lock /var/lock/opkg.lock....错误解决

看到类似这个错误,你得先确定你的软件源地址是否可以访问获取内容!

解决方法一

echo "nameserver 114.114.114.114">/tmp/resolv.conf
rm -f /var/lock/opkg.lock #删除
opkg update  #更新

解决方法二

或进入/etc/resolv.conf文件修改dns,默认的nameserver是127.0.0.1,我们修改它为公共dns地址即可!

search lan
nameserver 114.114.114.114
nameserver 119.29.29.29
nameserver 223.6.6.6 
nameserver 8.8.8.8

之后在openwrt里ping百度试试是否通!如果通更新软件源即可!


版权声明

本文仅代表作者观点,不代表Csuper立场。
本文系作者授权百度百家发表,未经许可,不得转载。