opkg 全部更新
最近一直折腾OpenWrt,突然
opkg list-upgradable
发现好多可以更新的包,发现opkg并没有提供一条命令直接升级,而必须是
opkg upgrade 软件包
,这样升级,于是想了个办法。
opkg list-upgradable | awk -F ' - ' '{print $1}' | xargs opkg upgrade > /tmp/upgrade.log
Dammit! 为什么有这么多的事情值得吐槽?
最近一直折腾OpenWrt,突然
opkg list-upgradable
发现好多可以更新的包,发现opkg并没有提供一条命令直接升级,而必须是
opkg upgrade 软件包
,这样升级,于是想了个办法。
opkg list-upgradable | awk -F ' - ' '{print $1}' | xargs opkg upgrade > /tmp/upgrade.log
Collected errors:
* pkg_hash_check_unresolved: cannot find dependency kmod-nft-core for nftables-json
* pkg_hash_fetch_best_installation_candidate: Packages for nftables-json found, but incompatible with the architectures configured
* pkg_hash_check_unresolved: cannot find dependency kmod-nft-core for firewall4
* pkg_hash_check_unresolved: cannot find dependency kmod-nft-fib for firewall4
* pkg_hash_check_unresolved: cannot find dependency kmod-nft-offload for firewall4
* pkg_hash_check_unresolved: cannot find dependency kmod-nft-nat for firewall4
建议您还是谨慎更新,包括任何Linux系统以及路由器openwrt,我感觉Linux的包管理之间的互相依赖极为复杂,更新极可能会导致有些应用无法启动,甚至系统彻底崩溃掉。您所遇到的问题就是各种包互相依赖无法解决,所以无法完成更新。还有构架不兼容,因为openwrt设备的处理器种类较多。
能稳定运行的时候,最好别更新,天知道会起什么冲突,我一个360t7刷了最新版的openwrt,把一个zerotier插件升级到最新版,然后zerotier的服务就开始不停的重启,我刷机、找资料、分析log,找旧版zerotier,折腾了两天,才把zerotier回到上一个版本。
是的,特别是对于稳定性要求机器高的设备,还有就是我认为Linux(openwrt)的缺陷,单个软件包里不集成相应依赖包,不像Windows一般安装软件的目录里都集成了所需的动态链接库等等,不怕这些依赖被其他软件包给意外升降级。