Adbyby无法更新规则的解决方案

Adbyby无法更新规则的解决方案

观察被调用的/usr/share/adbyby/adblock.sh可知,由于其使用了命令wget-ssl而系统中无此命令,故报错。

解决方案A

建立硬链接

ln /usr/bin/wget /usr/bin/wget-ssl

接下来又报错:

wget: unrecognized option: tries=1

Usage: wget [options]

Options:

-4 Use IPv4 only

-6 Use IPv6 only

-q Turn off status messages

-O Redirect output to file (use "-" for stdout)

-P

Set directory for output files

--user= HTTP authentication username

--password= HTTP authentication password

--user-agent|-U 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= Load CA certificates from file

--no-check-certificate don't validate the server's certificate

--ciphers= 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中描述删除多余参数,这样做的好处是避免建立硬链接,从而引起其他程序的错误。

关键点

观察被调用的/usr/share/adbyby/adblock.sh可知,由于其使用了命令wget-ssl而系统中无此命令,故报错。 解决方案A 建立硬链接 ln /usr/bin/wget /usr/bin/wget-ss

相关文章