OpenWrt Forum Archive

Topic: Unknown package 'adblock'.

The content of this topic has been archived on 3 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi,
my router: TP-Link TL-WR841N/ND v9
my OpenWRT: CHAOS CALMER (15.05.1, r48532)

I have been trying install "adblock" package. However during installation I get following error:

root@OpenWrt:~# opkg update
...
root@OpenWrt:~# opkg install adblock
Unknown package 'adblock'.
Collected errors:
 * opkg_install_cmd: Cannot install package adblock.

What am I doing wrong ?

czezz wrote:

What am I doing wrong ?

Nothing.
But adblock has not been pre-compiled for 15.05.1 as support for it has been only added after the build. so there is not downloadable packae for 15.05(.1)

Download manually and install a trunk adblock package. It should be compatible.

(Last edited by hnyman on 21 Apr 2016, 21:46)

czezz wrote:

Hi,
my router: TP-Link TL-WR841N/ND v9
my OpenWRT: CHAOS CALMER (15.05.1, r48532)

I have been trying install "adblock" package. However during installation I get following error:

root@OpenWrt:~# opkg update
...
root@OpenWrt:~# opkg install adblock
Unknown package 'adblock'.
Collected errors:
 * opkg_install_cmd: Cannot install package adblock.

What am I doing wrong ?

Nothing, it's not part of the CC release repository. Install it manually, see here

Many thanks for replies smile
However I hit another problem:

root@OpenWrt:~# opkg install /tmp/adblock_1.0.3-1_all.ipk 
Installing adblock (1.0.3-1) to root...
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for adblock:
 *     wget * 
 * opkg_install_cmd: Cannot install package adblock.

It seems like it does not like wget ?

opkg update; opkg install wget; opkg install /tmp/adblock_1.0.3-1_all.ipk

wget is there:

root@OpenWrt:~# wget
BusyBox v1.23.2 (2016-01-02 18:01:44 CET) multi-call binary.

Usage: wget [-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]
    [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
    [-U|--user-agent AGENT] URL...

Retrieve files via HTTP or FTP

    -s    Spider mode - only check file existence
    -c    Continue retrieval of aborted transfer
    -q    Quiet
    -P DIR    Save to DIR (default .)
    -O FILE    Save to FILE ('-' for stdout)
    -U STR    Use STR for User-Agent header
    -Y    Use proxy ('on' or 'off')

Nevertheless I tried to install/reinstall it and here is the story:

root@OpenWrt:~# opkg update; opkg install wget; 
...
Installing wget (1.17.1-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/packages/wget_1.17.1-1_ar71xx.ipk.
Installing libpcre (8.38-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/packages/libpcre_8.38-1_ar71xx.ipk.
Installing libopenssl (1.0.2g-1) to root...
Configuring libpcre.
Collected errors:
 * verify_pkg_installable: Only have 256kb available on filesystem /overlay, pkg libopenssl needs 676
 * opkg_install_cmd: Cannot install package wget.

Well, Dirk might provide better answer, but I'd assume that his adblock requires the full wget, not the busybox substitute, that's why it's listed as dependency.

Not sure if wget-nossl would satisfy the dependency but it may be installable on your router.

czezz wrote:

wget is there:

root@OpenWrt:~# wget
BusyBox v1.23.2 (2016-01-02 18:01:44 CET) multi-call binary.

Usage: wget [-c|--continue] [-s|--spider] [-q|--quiet] [-O|--output-document FILE]
    [--header 'header: value'] [-Y|--proxy on/off] [-P DIR]
    [-U|--user-agent AGENT] URL...

Retrieve files via HTTP or FTP

    -s    Spider mode - only check file existence
    -c    Continue retrieval of aborted transfer
    -q    Quiet
    -P DIR    Save to DIR (default .)
    -O FILE    Save to FILE ('-' for stdout)
    -U STR    Use STR for User-Agent header
    -Y    Use proxy ('on' or 'off')

Nevertheless I tried to install/reinstall it and here is the story:

root@OpenWrt:~# opkg update; opkg install wget; 
...
Installing wget (1.17.1-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/packages/wget_1.17.1-1_ar71xx.ipk.
Installing libpcre (8.38-1) to root...
Downloading http://downloads.openwrt.org/chaos_calmer/15.05.1/ar71xx/generic/packages/packages/libpcre_8.38-1_ar71xx.ipk.
Installing libopenssl (1.0.2g-1) to root...
Configuring libpcre.
Collected errors:
 * verify_pkg_installable: Only have 256kb available on filesystem /overlay, pkg libopenssl needs 676
 * opkg_install_cmd: Cannot install package wget.

as stangri said, busybox wget is not sufficient, you need the full wget package with ssl support. To enlarge your root filesystem, see here.

Eventually, as my HW has very limited disk space, I have used script from the following project and it works perfectly to me:
https://gist.github.com/teffalump/7227752

The only change I did to this script is to keep block.hosts on /tmp instead of /etc as the size of the file is nearly 2.0 MB as of today.
The downside of this workaround is that the list of domains needs to be downloaded and re-built every reboot (which in fact is not a big deal as it is automated).

many thanks for this topic

Thanks for the post.
I am trying to setup the script for on my Tp link wr841n v9.

When I run the script from /tmp directory, it doesnt show any output.
Neither does it block any ads.
Is there something different that I need to do?

Here is the list of commands I ran:
scp adblock.sh root@192.168.1.1:/tmp/adblock.sh
ssh root@192.168.1.1
chmod +x /tmp/adblock.sh
sh /tmp/adblock.sh -f

The discussion might have continued from here.