Open wujun4code opened 1 month ago
基本可以确定是 opewrt 23 版本上的一些修改引发了跟 openclash 的不兼容,我四台完全不同架构,不同固件,不同版本的 openclash 综合测试
openwrt x86_64 最新版本也是一样的情况,无法使用。
@calidion 你用 openwrt.ai 生成 x86 的固件,然后编译的时候 按照我这个选择
就可以完美运行 openclash,后装 openclash 大多数都无法正常运行,一定要在编译期把内核组件一起编译。
我使用的是openwrt原始版本。通过命令行与网页都不能安装成功。
@calidion 我尝试过你的步骤,原始的 openwrt 版本我从未安装 openclash 成功过,哪怕安装了,也跑不起来,跑起来了,也会出问题,跑一会儿就重启,然后就死了,所以我强烈推荐自己编译,编译的时候一定要引入 kmod 几个内核服务一起编译,我保证你的 openwrt 版本对应的 kmod-ipt-nat 和 kmod-tun 都找不到,我试过从零 openwrt 开始,找对应版本的 kmod-tun,根本找不到,因此唯一的解决方案就是自定义编译。
为什么这个插件不能兼容官方的插件系统?
@calidion 不是不兼容,是你用的 官方的固件 并没有把 kmod 所有组件都编译进去,这个不可能把内核一起给你编译,你看它的安装教程的第一步就是让你安装基于你目前系统的官方组件
#nftables
opkg update
opkg install coreutils-nohup bash dnsmasq-full curl ca-certificates ipset ip-full libcap libcap-bin ruby ruby-yaml kmod-tun kmod-inet-diag unzip kmod-nft-tproxy luci-compat luci luci-base
你看到的 kmod
开头的全都是内核组件,而你用的官方的固件并没有把这几个固件都编译进去,所以导致 openclash 不能用。
结论就是:openclash 不可能针对每一个版本的内核都编译对应的内核组件,因为那是你系统本来就应该有的,你看一下你的内核版本是多少,如果是 openwrt 官方的固件一般都很精简,根本用不了,缺一大堆内核组件,这锅是 openwrt 官方自己的。
我装了这些固件一样安装运行不了。 openclash还要自己下载软件什么的。好像。 看起来像是spyware.
@calidion 是的,你经历过的这些我都经历过,最终的解决方案是:放弃官方 openwrt 纯净版,在 openwrt.ai 或者在 https://firmware-selector.immortalwrt.org/ 这里选择固件,更进一步是在 github 上找能让你自定义编译固件的开源 github action,然后你自己研究一下编译脚本,把
coreutils-nohup bash dnsmasq-full curl ca-certificates ipset ip-full libcap libcap-bin ruby ruby-yaml kmod-tun kmod-inet-diag unzip kmod-nft-tproxy luci-compat luci luci-base
这些组件都编译进去,因为这些组件都跟你所使用的 内核版本,不是 openwrt 版本,openwrt 版本目前是 21或者23 是主流,而内核版本有的是 5.4 有的是 5.5 还有一些是 5.6,kmod-tun kmod-inet-diag unzip kmod-nft-tproxy
这几个组件跟内核版本息息相关,必须统一到小数点个位数的版本号,你装了的那些可能是兼容版本,那些只是兼容你目前的 openwrt 版本,不代表一定能运行起来。
我甚至自己下载过kmod-tun kmod-inet-diag unzip kmod-nft-tproxy
这几个版本对应我的 openwrt 内核,但是就因为小数点版本号不兼容,我死也装不上 openclash,最后我放弃了,决定自定义编译,再次劝退 官方 openwrt 的 snapshot 版本,那个是给路由器厂商的参考标准,不是民用级别的固件,纯净版是绝对无法正常使用的。
官方固件取消选dnsmasq换成dnsmasq-full 然后其它默认就行了啊 我x86一直这么编译的,arm行不通吗? 我的action config甚至就这5行
# CONFIG_PACKAGE_dnsmasq is not set
CONFIG_PACKAGE_luci-app-openclash=y
CONFIG_TARGET_x86_64_DEVICE_generic=y
CONFIG_TARGET_x86_64=y
CONFIG_TARGET_x86=y
这些组件都编译进去,因为这些组件都跟你所使用的 内核版本,不是 openwrt 版本,openwrt 版本目前是 21或者23 是主流,而内核版本有的是 5.4 有的是 5.5 还有一些是 5.6,
kmod-tun kmod-inet-diag unzip kmod-nft-tproxy
这几个组件跟内核版本息息相关,必须统一到小数点个位数的版本号,你装了的那些可能是兼容版本,那些只是兼容你目前的 openwrt 版本,不代表一定能运行起来。
我是x86_64的。安装完成了。但是不能使用。
Executing package manager
Unknown package 'luci-app-openclash'.
Errors
Collected errors:
* pkg_hash_check_unresolved: cannot find dependency dnsmasq-full for luci-app-openclash
* pkg_hash_check_unresolved: cannot find dependency coreutils-nohup for luci-app-openclash
* pkg_hash_check_unresolved: cannot find dependency bash for luci-app-openclash
* pkg_hash_check_unresolved: cannot find dependency ipset for luci-app-openclash
* pkg_hash_fetch_best_installation_candidate: Packages for luci-app-openclash found, but incompatible with the architectures configured
* opkg_install_cmd: Cannot install package luci-app-openclash.
The opkg install command failed with code 255.
root@OpenWrt:~# opkg install dnsmasq-full coreutils-nohup bash ipset
Unknown package 'dnsmasq-full'.
Unknown package 'coreutils-nohup'.
Unknown package 'bash'.
Unknown package 'ipset'.
Collected errors:
* opkg_install_cmd: Cannot install package dnsmasq-full.
* opkg_install_cmd: Cannot install package coreutils-nohup.
* opkg_install_cmd: Cannot install package bash.
* opkg_install_cmd: Cannot install package ipset.
root@OpenWrt:~# opkg update
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_core
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/packages/Packages.sig
Signature check failed.
Remove wrong Signature file.
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_base
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/kmods/6.6.43-1-7d4380a42289459dbd4f03be492ca992/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_kmods
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/kmods/6.6.43-1-7d4380a42289459dbd4f03be492ca992/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/luci/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_luci
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/luci/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/packages/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_packages
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/packages/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/routing/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_routing
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/routing/Packages.sig
Signature check passed.
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/telephony/Packages.gz
Updated list of available packages in /var/opkg-lists/openwrt_telephony
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/telephony/Packages.sig
Signature check passed.
root@OpenWrt:~# opkg install dnsmasq-full coreutils-nohup bash ipset
Installing dnsmasq-full (2.90-r2) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/dnsmasq-full_2.90-r2_x86_64.ipk
Installing libnettle8 (3.9.1-r1) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/libnettle8_3.9.1-r1_x86_64.ipk
Installing libnfnetlink0 (1.0.2-r1) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/libnfnetlink0_1.0.2-r1_x86_64.ipk
Installing kmod-nf-conntrack-netlink (6.6.43-r1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/kmods/6.6.43-1-7d4380a42289459dbd4f03be492ca992/kmod-nf-conntrack-netlink_6.6.43-r1_x86_64.ipk
Installing libnetfilter-conntrack3 (1.0.9-r2) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/libnetfilter-conntrack3_1.0.9-r2_x86_64.ipk
Installing coreutils-nohup (9.3-r1) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/packages/coreutils-nohup_9.3-r1_x86_64.ipk
Installing bash (5.2.21-r1) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/packages/bash_5.2.21-r1_x86_64.ipk
Installing terminfo (6.4-r2) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/terminfo_6.4-r2_x86_64.ipk
Installing libncurses6 (6.4-r2) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/libncurses6_6.4-r2_x86_64.ipk
Installing libreadline8 (8.2-r2) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/libreadline8_8.2-r2_x86_64.ipk
Installing ipset (7.21-r1) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/ipset_7.21-r1_x86_64.ipk
Installing kmod-ipt-ipset (6.6.43-r1) to root...
Downloading https://downloads.openwrt.org/snapshots/targets/x86/64/kmods/6.6.43-1-7d4380a42289459dbd4f03be492ca992/kmod-ipt-ipset_6.6.43-r1_x86_64.ipk
Installing libipset13 (7.21-r1) to root...
Downloading https://downloads.openwrt.org/snapshots/packages/x86_64/base/libipset13_7.21-r1_x86_64.ipk
Configuring terminfo.
Configuring libncurses6.
Configuring libreadline8.
Configuring bash.
Configuring libnfnetlink0.
Configuring kmod-nf-conntrack-netlink.
Configuring libnetfilter-conntrack3.
Configuring kmod-ipt-ipset.
Configuring libipset13.
Configuring ipset.
Configuring libnettle8.
Configuring coreutils-nohup.
Configuring dnsmasq-full.
Collected errors:
* resolve_conffiles: Existing conffile /etc/config/dhcp is different from the conffile in the new package. The new conffile will be placed at /etc/config/dhcp-opkg.
root@OpenWrt:~#
Executing package manager Package luci-app-openclash (0.46.014-beta) installed in root is up to date. Errors Collected errors:
各种错误,不断出现。似乎不能通过 安装 pkg解决
不随编译安装的话kmod你得自己找,尤其snapshots
你这5分钟下载两个内核版本,肯定是有问题的 6.6.43-1-7d4380a42289459dbd4f03be492ca992 6.6.44-1-2e398c67f090c3654e410bca7e776644
还有安装openclash需要的依赖有很多
dnsmasq-full: 已安装
coreutils: 已安装
coreutils-nohup: 已安装
bash: 已安装
curl: 已安装
ca-certificates: 已安装
ipset: 已安装
ip-full: 已安装
libcap: 已安装
libcap-bin: 已安装
ruby: 已安装
ruby-yaml: 已安装
ruby-psych: 已安装
ruby-pstore: 已安装
kmod-tun(TUN模式): 已安装
luci-compat(Luci >= 19.07): 已安装
kmod-inet-diag(PROCESS-NAME): 已安装
unzip: 已安装
kmod-nft-tproxy: 未安装
所以随编译安装最稳妥
pkg_hash_check_unresolved: cannot find dependency kernel (= 6.6.44~2e398c67f090c3654e410bca7e776644-r1) for kmod-crypto-crc32c
这就是我说的,内核没有编译进去,所以你根本用不了,放弃吧。。。
这些内核模块好像是可以指定的。我有时间再看看。
这个问题其实很好解决 panckge底下有一个kernel开头的ipk文件,opkg update以后,先手动装完这个文件然后装别的kmod文件就行
这个问题其实很好解决 panckge底下有一个kernel开头的ipk文件,opkg update以后,先手动装完这个文件然后装别的kmod文件就行
有没有代码级教程?
opkg update opkg list 找到个kernel开头的ipk opkg install kernel-xxxxx.ipk
然后再安装别的kmod 重新opkg update后记得检查kernel文件 同时内核不能跨版本 6.1的不能装6.6的
opkg update opkg list 找到个kernel开头的ipk opkg install kernel-xxxxx.ipk
然后再安装别的kmod 重新opkg update后记得检查kernel文件 同时内核不能跨版本 6.1的不能装6.6的
还是不行。
还是不行。
https://blog.csdn.net/qq_29974161/article/details/108573994
你看这个,不行我也不会了 之前我确实这么搞成过,和你现在一个情况,原版系统,自己卸载dnsmasq然后装dnsmasq-full,装kernel,装kmod,装其它依赖,装openclash 现在手头没机器能测试
不过我建议你非特殊情况别这么装了,上次装完所有依赖花了两个多小时。本地重新编译就半个小时,云编译也就一个半小时,真的没必要。
你把 https://github.com/P3TERX/Actions-OpenWrt fork上
diy-part1.sh
加一行 echo 'src-git openclash https://github.com/vernesong/OpenClash' >>feeds.conf.default
.github/workflows/openwrt-builder.yml
里的 https://github.com/coolsnowwolf/lede
改成 https://github.com/openwrt/openwrt
如果没特殊要求和嗜好再把master
改成openwrt-23.05
.config
里改成
# CONFIG_PACKAGE_dnsmasq is not set
CONFIG_PACKAGE_luci-app-openclash=y
CONFIG_TARGET_x86_64_DEVICE_generic=y
CONFIG_TARGET_x86_64=y
CONFIG_TARGET_x86=y
然后手动触发一下,一个半小时就好了
哈哈哈,最终还是走向了自定义编译。。。来吧 https://openwrt.ai 选择 x86 一样的。哈哈哈
Verify Steps
OpenClash Version
v0.46.014-beta
Bug on Environment
Immortalwrt
OpenWrt Version
ImmortalWrt 23.05.3 r27917-81a1f98d5b / LuCI openwrt-23.05 branch git-24.092.44091-d24c2e3
Bug on Platform
Linux-arm64
Describe the Bug
路由器信息如下
错入日志如下
我尝试过修改配置,并且切换了 master 和 developer 两个分支,都是一样的错误。
To Reproduce
全都是默认配置,没有任何其他操作
OpenClash Log
OpenClash Config
Expected Behavior
我有 3 台 openwrt 设备
现在我用的是 immortalwrt 官方最新固件 https://firmware-selector.immortalwrt.org/?version=23.05.3&target=mediatek%2Ffilogic&id=nokia_ea0326gmp
就出现了这个问题。
Additional Context
No response