在使用docker 安装完openwrt 以后,安装openclash是很可能遇到如下问题
~ # opkg install luci-app-openclash_0.44.29-beta_all.ipk
Installing luci-app-openclash (0.44.29-beta) to root...
Installing dnsmasq-full (2.85-8) to root...
Downloading https://downloads.openwrt.org/releases/21.02.2/packages/i386_pentium4/base/dnsmasq-full_2.85-8_i386_pentium4.ipk
Collected errors:
* check_data_file_clashes: Package dnsmasq-full wants to install file /etc/hotplug.d/ntp/25-dnsmasqsec
But that file is already provided by package * dnsmasq
* check_data_file_clashes: Package dnsmasq-full wants to install file /etc/init.d/dnsmasq
But that file is already provided by package * dnsmasq
* check_data_file_clashes: Package dnsmasq-full wants to install file /usr/lib/dnsmasq/dhcp-script.sh
But that file is already provided by package * dnsmasq
* check_data_file_clashes: Package dnsmasq-full wants to install file /usr/sbin/dnsmasq
But that file is already provided by package * dnsmasq
* check_data_file_clashes: Package dnsmasq-full wants to install file /usr/share/acl.d/dnsmasq_acl.json
But that file is already provided by package * dnsmasq
* check_data_file_clashes: Package dnsmasq-full wants to install file /usr/share/dnsmasq/dhcpbogushostname.conf
But that file is already provided by package * dnsmasq
* check_data_file_clashes: Package dnsmasq-full wants to install file /usr/share/dnsmasq/rfc6761.conf
But that file is already provided by package * dnsmasq
* opkg_install_cmd: Cannot install package luci-app-openclash.
这个报错是因为dnsmasq-full 与dnsmasq冲突导致
如果这时候你先卸载了dnsmasq
会出现以下问题:
root@OpenWrt:/tmp# opkg remove dnsmasq
Removing package dnsmasq from root...
Not deleting modified conffile /etc/dnsmasq.conf.
Not deleting modified conffile /etc/config/dhcp.
root@OpenWrt:/tmp# opkg install dnsmasq-full
Installing dnsmasq-full (2.73-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/base/dnsmasq-full_2.73-1_ar71xx.ipk.
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.
总结:
安装与卸载应该同步进行
opkg remove dnsmasq && opkg install dnsmasq-full
如果还是不慎卸载,你还有办法挽救:首先,dnsmasq 承担的是解析域名的角色,所以只需要想办法绕过域名解析就可以了
编辑 /etc/opkg/distfeeds.conf,将 downloads.openwrt.org 替换为解析到的 IP 即可。
例如:在网络正常的机器上,执行 ping 到一个源:
ping downloads.openwrt.org
PING downloads.openwrt.org (xxx.xxx.xxx.xxx):56 data bytes#Or USTC mirrorsping mirrors.ustc.edu.cn
PING mirrors.ustc.edu.cn (xxx.xxx.xxx.xxx):56 data bytes
ping 会显示解析出的 IP,将其记下并替换即可
网友评论