观察被调用的/usr/share/adbyby/adblock.sh
可知,由于其使用了命令wget-ssl
而系统中无此命令,故报错。
解决方案A
建立硬链接
ln /usr/bin/wget /usr/bin/wget-ssl
接下来又报错:
wget: unrecognized option: tries=1
Usage: wget [options] <URL>
Options:
-4 Use IPv4 only
-6 Use IPv6 only
-q Turn off status messages
-O <file> Redirect output to file (use "-" for stdout)
-P <dir> Set directory for output files
--user=<user> HTTP authentication username
--password=<password> HTTP authentication password
--user-agent|-U <str> Set HTTP user agent
--post-data=STRING use the POST method; send STRING as the data
--spider|-s Spider mode - only check file existence
--timeout=N|-T N Set connect/request timeout to N seconds
--proxy=on|off|-Y on|off Enable/disable env var configured proxy
HTTPS options:
--ca-certificate=<cert> Load CA certificates from file <cert>
--no-check-certificate don't validate the server's certificate
--ciphers=<cipherlist> Set the cipher list string
是因为此版本中wget
没有相关参数,使用相近的替代或直接删除即可。
对/usr/share/adbyby/
目录下的adblock.sh
adbybyupdate.sh
等文件分别进行类似替换操作后,发现规则更新成功。
解决方案B
对/usr/share/adbyby/
目录下的adblock.sh
adbybyupdate.sh
等文件均进行替换操作:将wget-ssl
改为wget
,并按解决方案A中描述删除多余参数,这样做的好处是避免建立硬链接,从而引起其他程序的错误。