vernesong / OpenClash

A Clash Client For OpenWrt
MIT License
16.79k stars 3.09k forks source link

[Bug] 错误:Ruby 依赖异常,无法校验配置文件,请确认 Ruby 依赖工作正常后重试! #2512

Closed zhilun2021 closed 1 year ago

zhilun2021 commented 2 years ago

Verify Steps

OpenClash Version

v0.45.33-beta

Bug on Environment

Official OpenWrt

Bug on Platform

Linux-armv8

To Reproduce

2022-06-27 00:43:41 错误:Ruby 依赖异常,无法校验配置文件,请确认 Ruby 依赖工作正常后重试! 2022-06-27 00:43:41 第三步: 修改配置文件... 2022-06-27 00:43:41 第二步: 组件运行前检查... 2022-06-27 00:43:41 第一步: 获取配置... 2022-06-27 00:43:41 OpenClash 开始启动...

Describe the Bug

依赖全部安装好后,安装Luci-app-clash成功,导入配置提示语法错误,启动openclash提示 错误:Ruby 依赖异常,无法校验配置文件,请确认 Ruby 依赖工作正常后重试!

OpenClash Log

2022-06-27 00:43:45 OpenClash 开始关闭... 2022-06-27 00:43:41 错误:Ruby 依赖异常,无法校验配置文件,请确认 Ruby 依赖工作正常后重试! 2022-06-27 00:43:41 第三步: 修改配置文件... 2022-06-27 00:43:41 第二步: 组件运行前检查... 2022-06-27 00:43:41 第一步: 获取配置... 2022-06-27 00:43:41 OpenClash 开始启动... 2022-06-27 00:43:41 第六步:删除 OpenClash 残留文件... 2022-06-27 00:43:38 第五步: 重启 Dnsmasq 程序... 2022-06-27 00:43:38 第四步: 关闭 Clash 主程序... 2022-06-27 00:43:38 第三步: 关闭 OpenClash 守护程序... 2022-06-27 00:43:37 第二步: 删除 OpenClash 防火墙规则... 2022-06-27 00:43:37 第一步: 备份当前策略组状态... 2022-06-27 00:43:37 OpenClash 开始关闭... 2022-06-27 00:41:32 第六步:删除 OpenClash 残留文件... 2022-06-27 00:41:29 第五步: 重启 Dnsmasq 程序... 2022-06-27 00:41:29 第四步: 关闭 Clash 主程序... 2022-06-27 00:41:29 第三步: 关闭 OpenClash 守护程序... 2022-06-27 00:41:28 第二步: 删除 OpenClash 防火墙规则... 2022-06-27 00:41:28 第一步: 备份当前策略组状态... 2022-06-27 00:41:28 OpenClash 开始关闭... 2022-06-27 00:41:24 错误:Ruby 依赖异常,无法校验配置文件,请确认 Ruby 依赖工作正常后重试! 2022-06-27 00:41:24 第三步: 修改配置文件... 2022-06-27 00:41:24 第二步: 组件运行前检查... 2022-06-27 00:41:24 第一步: 获取配置... 2022-06-27 00:41:24 OpenClash 开始启动... 2022-06-27 00:41:24 第六步:删除 OpenClash 残留文件... 2022-06-27 00:41:20 第五步: 重启 Dnsmasq 程序... 2022-06-27 00:41:20 第四步: 关闭 Clash 主程序... 2022-06-27 00:41:20 第三步: 关闭 OpenClash 守护程序... 2022-06-27 00:41:20 第二步: 删除 OpenClash 防火墙规则... 2022-06-27 00:41:20 第一步: 备份当前策略组状态... 2022-06-27 00:41:20 OpenClash 开始关闭...

OpenClash Config

No response

Expected Behavior

希望尽快修复这个问题。已经集成在固件的就正常。没集成openclash的固件。手动安装的就会出现这个错误。

Screenshots

QQ截图20220627005024 QQ截图20220627005037

vernesong commented 2 years ago

依赖问题没好办法,不是我们解决的

jayling1111 commented 2 years ago

换个固件把

github-actions[bot] commented 2 years ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

crh251 commented 2 years ago

是依赖版本问题吗?回退到哪个openwrt版本可以正常用呢?

wudj1967 commented 2 years ago

ruby版本可能不对,最好能降到3.0.4

RuningBun commented 2 years ago

降版本问题解决了么?

wudj1967 commented 1 year ago

降版本就正常了

lovelywanz commented 1 year ago

今晚折腾了三个小时了,无论怎样尝试,都摆脱不了这个依赖异常错误。把所有ruby相关文件退回到3.0.4试过了,没用。把openclash和内核降级,也没用。

github-actions[bot] commented 1 year ago

This issue is stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 5 days

joy08956 commented 3 months ago

依赖问题没好办法,不是我们解决的 root@QWRT:~# ruby -ryaml -E UTF-8 -e "YAML.load_file('/usr/share/openclash/res/default.yaml')" /usr/lib/ruby/3.0/yaml.rb:3: warning: It seems your ruby installation is missing psych (for YAML output). To eliminate this warning, please install libyaml and reinstall your ruby. /usr/lib/ruby/3.0/yaml.rb:4:in require': cannot load such file -- psych (LoadError) from /usr/lib/ruby/3.0/yaml.rb:4:in<top (required)>' from -e:in `require'

markixy commented 1 week ago

我是 openwrt18.06.9,给ruby-yaml降版本就好了。

原来长这样,所以盲猜ruby-yaml版本太高。 root@OpenWrt:~# opkg list-installed |grep ruby libruby - 2.5.8-1 ruby - 2.5.8-1 ... ruby-yaml - 3.3.4-r1

解决方式:给ruby-yaml降版本 wget http://mirrors.aliyun.com/openwrt/releases/18.06.9/packages/x86_64/packages/ruby-yaml_2.5.8-1_x86_64.ipk opkg install ruby-yaml_2.5.8-1_x86_64.ipk --force-downgrade