vernesong / OpenClash

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

无法安装 (Couldn't install) #1034

Closed predragking closed 3 years ago

predragking commented 3 years ago

各位好,

透过opkg install要安装0.41.04-beta一直无法安装,出现以下错误信息,不知道其它群友是否有碰到类似问题并有解决方法?

root@OpenWrt:/tmp# opkg install luci-app-openclash_0.41.04-beta_all.ipk
Installing luci-app-openclash (0.41.04-beta) to root...
Collected errors:
 * pkg_run_script: package "luci-app-openclash" preinst script returned status 1.
 * preinst_configure: Aborting installation of luci-app-openclash.
 * opkg_install_cmd: Cannot install package luci-app-openclash.

执行这个指令之前,已经先做过了opkg update

不知还有哪个地方遗漏没做的

谢谢

YukawaMi commented 3 years ago

看看DEBUG日志是不是缺依赖

predragking commented 3 years ago

看看DEBUG日志是不是缺依赖

@YukawaMi 请问您指的是opkg里面的Debug日志吗? opkg install xxxx -V 是这个对吗?

predragking commented 3 years ago

@YukawaMi

以下是我输入debug指令得到的结果

root@OpenWrt:/tmp# opkg install luci-app-openclash_0.41.04-beta_all.ipk -V
opkg_conf_parse_file: Loading conf file /etc/opkg.conf.
opkg_conf_parse_file: Loading conf file /etc/opkg/customfeeds.conf.
opkg_conf_parse_file: Loading conf file /etc/opkg/distfeeds.conf.
pkg_hash_load_feeds: 
pkg_hash_load_feeds: 
pkg_hash_load_feeds: 
pkg_hash_load_feeds: 
pkg_hash_load_status_files: 
pkg_info_preinstall_check: Updating file owner list.
Installing luci-app-openclash (0.41.04-beta) to root...
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=dnsmasq-full:
pkg_hash_fetch_best_installation_candidate: dnsmasq-full 2.80 x86_64
pkg_hash_fetch_best_installation_candidate: dnsmasq-full 2.82 x86_64
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=coreutils:
pkg_hash_fetch_best_installation_candidate: coreutils 8.23 x86_64
pkg_hash_fetch_best_installation_candidate: coreutils 8.32 x86_64
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=coreutils-nohup:
pkg_hash_fetch_best_installation_candidate: coreutils-nohup 8.23 x86_64
pkg_hash_fetch_best_installation_candidate: coreutils-nohup 8.32 x86_64
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=bash:
pkg_hash_fetch_best_installation_candidate: bash 4.4.18 x86_64
pkg_hash_fetch_best_installation_candidate: bash 5.0 x86_64
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=curl:
pkg_hash_fetch_best_installation_candidate: curl 7.66.0 x86_64
pkg_hash_fetch_best_installation_candidate: curl 7.73.0 x86_64
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=ca-certificates:
pkg_hash_fetch_best_installation_candidate: ca-certificates 20180409 all
pkg_hash_fetch_best_installation_candidate: ca-certificates 20200601 all
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=ipset:
pkg_hash_fetch_best_installation_candidate: ipset 7.1 x86_64
pkg_hash_fetch_best_installation_candidate: ipset 7.6 x86_64
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=ip-full:
pkg_hash_fetch_best_installation_candidate: ip-full 5.0.0 x86_64
pkg_hash_fetch_best_installation_candidate: ip-full 5.9.0 x86_64
pkg_hash_fetch_best_installation_candidate: 2 matching pkgs for apkg=libcap:
pkg_hash_fetch_best_installation_candidate: libcap 2.26 x86_64
pkg_hash_fetch_best_installation_candidate: libcap 2.43 x86_64
pkg_run_script: Running script /tmp/opkg-FliDfH/luci-app-openclash-CHpomM/preinst.
opkg_configure_packages: Configuring unpacked packages.
opkg_configure_packages: Reordering packages before configuring them...
write_status_files_if_changed: Writing status file.
pkg_write_changed_filelists: Saving changed filelists.
Collected errors:
 * pkg_run_script: package "luci-app-openclash" preinst script returned status 1.
 * preinst_configure: Aborting installation of luci-app-openclash.
 * opkg_install_cmd: Cannot install package luci-app-openclash.

希望对问题解决有帮助

YukawaMi commented 3 years ago

coreutils-nohup, bash, iptables, dnsmasq-full, curl, jsonfilter, ca-certificates, ipset, ip-full, iptables-mod-tproxy, iptables-mod-extra, libcap, libcap-bin, ruby, ruby-yaml 这些依赖你看下你都有吗

predragking commented 3 years ago

@YukawaMi 这些依赖我都确认过有装,以下是调试日志的内容

OpenClash 调试日志

生成时间: 2020-11-28 02:16:12
插件版本: 

#===================== 系统信息 =====================#
主机型号: Intel(R) Core(TM) i7-6560U CPU @ 2.20GHz : 1 Core 2 Thread
固件版本: OpenWrt GDQ IPv4 6.1[2020]
LuCI版本: git-20.141.34051-f750b5f-1
内核版本: 4.19.122
处理器架构: x86_64

#此项在使用Tun模式时应为ACCEPT
防火墙转发: REJECT

#此项有值时建议到网络-接口-lan的设置中禁用IPV6的DHCP
IPV6-DHCP: 

#此项结果应仅有配置文件的DNS监听地址
Dnsmasq转发设置: 

#===================== 依赖检查 =====================#
dnsmasq-full: 已安装
coreutils: 已安装
coreutils-nohup: 已安装
bash: 已安装
curl: 已安装
jsonfilter: 已安装
ca-certificates: 已安装
ipset: 已安装
ip-full: 已安装
iptables-mod-tproxy: 已安装
kmod-tun(TUN模式): 已安装
luci-compat(Luci-19.07): 已安装

#===================== 内核检查 =====================#
运行状态: 未运行
已选择的架构: 未选择架构

#下方无法显示内核版本号时请确认您的内核版本是否正确或者有无权限
Tun内核版本: 
Tun内核文件: 不存在
Tun内核运行权限: 否

Game内核版本: 
Game内核文件: 不存在
Game内核运行权限: 否

Dev内核版本: 
Dev内核文件: 不存在
Dev内核运行权限: 否

#===================== 插件设置 =====================#
当前配置文件: 
运行模式: redir-host
默认代理模式: Rule
UDP流量转发: 启用
DNS劫持: 启用
自定义DNS: 停用
IPV6-DNS解析: 停用
禁用Dnsmasq缓存: 停用
自定义规则: 停用
仅允许内网: 停用
仅代理命中规则流量: 停用

#启动异常时建议关闭此项后重试
保留配置: 停用
第三方规则: 停用

#===================== 配置文件 =====================#

#===================== 防火墙设置 =====================#

#NAT chain

Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination         
1    REDIRECT   udp  --  0.0.0.0/0            0.0.0.0/0            udp dpt:53 redir ports 53
2    REDIRECT   tcp  --  0.0.0.0/0            0.0.0.0/0            tcp dpt:53 redir ports 53
3    DOCKER     all  --  0.0.0.0/0            0.0.0.0/0            ADDRTYPE match dst-type LOCAL
4    prerouting_rule  all  --  0.0.0.0/0            0.0.0.0/0            /* !fw3: Custom prerouting rule chain */
5    zone_lan_prerouting  all  --  0.0.0.0/0            0.0.0.0/0            /* !fw3 */
6    zone_wan_prerouting  all  --  0.0.0.0/0            0.0.0.0/0            /* !fw3 */
7    zone_vpn_prerouting  all  --  0.0.0.0/0            0.0.0.0/0            /* !fw3 */
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    DOCKER     all  --  0.0.0.0/0           !127.0.0.0/8          ADDRTYPE match dst-type LOCAL

#Mangle chain

Chain PREROUTING (policy ACCEPT)
num  target     prot opt source               destination         
Chain OUTPUT (policy ACCEPT)
num  target     prot opt source               destination         
1    RRDIPT_OUTPUT  all  --  0.0.0.0/0            0.0.0.0/0           

#===================== 路由表状态 =====================#
#route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.10.254  0.0.0.0         UG    0      0        0 br-lan
172.17.0.0      0.0.0.0         255.255.0.0     U     0      0        0 docker0
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 br-lan
#ip route list
default via 192.168.10.254 dev br-lan proto static src 192.168.10.144 
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1 linkdown 
192.168.10.0/24 dev br-lan proto kernel scope link src 192.168.10.144 
#ip rule show
0:  from all lookup local 
32766:  from all lookup main 
32767:  from all lookup default 

#===================== 端口占用状态 =====================#

#===================== 测试本机DNS查询 =====================#

#===================== resolv.conf.auto =====================#
# Interface lan
nameserver 192.168.10.254
search lan

#===================== 测试本机网络连接 =====================#

#===================== 测试本机网络下载 =====================#

#===================== 最近运行日志 =====================#
2020-11-27 19:29:42 Config Not Found
konbar commented 3 years ago

请先安装好这些依赖: coreutils-nohup, bash, iptables, dnsmasq-full, curl, jsonfilter, ca-certificates, ipset, ip-full, iptables-mod-tproxy, iptables-mod-extra, libcap, libcap-bin, ruby, ruby-yaml 你应该是缺少ruby,ruby-yaml这两个依赖

predragking commented 3 years ago

问题解决了,更新以下透过SSH处理过程

1) 移除既有版本 opkg remove luci-app-openclash 2) 更新依赖清单 opkg update 3) 确认依赖是否安装 opkg list-installed 4) 确认与安装缺少的依赖

opkg install [依赖名称] --force-overwrite 5) 安装新版的luci-app-openclash

上传ipk至/tmp
cd /tmp
opkg install [luci-app-openclash_<版本号>-beta_all.ipk] --force-overwrite

6) 软路由重启 7) 透过浏览器登入软路由>openclash>全局设置>基本设置>选择内核编译版本>版本更新>更新内核(dev, TUN, Game) 8) 再次软路由重启

NoMatter-98 commented 11 months ago

问题解决了,更新以下透过SSH处理过程

  1. 移除既有版本 opkg remove luci-app-openclash
  2. 更新依赖清单 opkg update
  3. 确认依赖是否安装 opkg list-installed
  4. 确认与安装缺少的依赖
  • coreutils-nohup
  • bash
  • iptables
  • dnsmasq-full
  • curl
  • jsonfilter
  • ca-certificates
  • ipset
  • ip-full
  • iptables-mod-tproxy
  • iptables-mod-extra
  • libcap
  • libcap-bin
  • ruby
  • ruby-yaml

opkg install [依赖名称] --force-overwrite 5) 安装新版的luci-app-openclash

上传ipk至/tmp
cd /tmp
opkg install [luci-app-openclash_<版本号>-beta_all.ipk] --force-overwrite
  1. 软路由重启
  2. 透过浏览器登入软路由>openclash>全局设置>基本设置>选择内核编译版本>版本更新>更新内核(dev, TUN, Game)
  3. 再次软路由重启

感谢,我今天配置也是遇到类似的问题,移除原本dnsmasq包然后替换成dnsmasq-full就搞定了,多谢你给我的思路启发!