angela-d / autohosts

Automate hosts file updates on Linux and MacOS. Block Firefox telemetry, Google snooping and web trackers at the root.
GNU General Public License v2.0
83 stars 6 forks source link

Install error and custom_filters not found #5

Closed frickymind closed 5 years ago

frickymind commented 5 years ago

Hi, Thanks for the programme. But I have some problems.

Install on Linux Mint 19.1 half works. On install I get this

$sudo apt install ./autohosts.deb Reading package lists... Done Building dependency tree
Reading state information... Done Note, selecting 'autohosts' instead of './autohosts.deb' autohosts is already the newest version (2.0.0). The following packages were automatically installed and are no longer required: chromium-codecs-ffmpeg-extra gir1.2-geoclue-2.0 gir1.2-geocodeglib-1.0 gir1.2-gweather-3.0 gjs libgjs0g python3-mutagen youtube-dl Use 'sudo apt autoremove' to remove them. 0 upgraded, 0 newly installed, 0 to remove and 55 not upgraded. 1 not fully installed or removed. After this operation, 0 B of additional disk space will be used. Do you want to continue? [Y/n] y Setting up autohosts (2.0.0) ... dpkg: error processing package autohosts (--configure): installed autohosts package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: autohosts E: Sub-process /usr/bin/dpkg returned an error code (1)

Grep version gives:

──╼ $grep "VERSION=" /usr/local/bin/autohosts grep: /usr/local/bin/autohosts: No such file or directory

Then running autohosts returns:

_- 100%[===================>] 5,48K --.-KB/s in 0s

2019-06-02 01:34:34 (44,8 MB/s) - written to stdout [5609/5609]

No custom filters found at homeuser, skipping... Checking if devdom is installed (will execute devdom hosts update, if so) Devdom is not installed; skipping. Hosts update complete!

Not sure where to go from here.

Also, is it possible to alter which version of Steven Black's hosts file is used?

Thanks!

angela-d commented 5 years ago

The postinstall script wasn't triggered by your install. You can run these commands manually to complete the install of autohosts and see if a more specific error appears:

sudo /var/lib/dpkg/info/autohosts.postinst

Did you remove old versions prior to installing, or is this a fresh install?

grep "VERSION=" /usr/local/bin/autohosts grep: /usr/local/bin/autohosts: No such file or directory

Oops, this is something in the readme I forgot to update when v2.0 was released. Will fix.

Also, is it possible to alter which version of Steven Black's hosts file is used?

Totally.

nano /usr/bin/autohosts

Find:

wget https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts -O /etc/hosts

And change https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts to the branch/version you want to use.

frickymind commented 5 years ago

Hi, Thanks fot the reply. It's a new install. I've made the changes you suggested and the error has disappeared. Cheers!

Also I like your comment:

hosts file curators: please keep your echo chambers to yourselves

hosts files are for adblocking, trackers and malware ONLY, not because you don't like shitposting sites (may as well ban reddit, too!)

angela-d commented 5 years ago

Awesome, glad it worked!!

Not sure why you had issues in the first place, but when I have free time I'll fire up a Mint install and see if there's something different about how they extract the deb. Most likely, it's how I packaged it that caused the issue.

Glad you like the dig at the censorship brigade! :smile:

angela-d commented 5 years ago

Finally got a chance to run some tests on this - the bugs should be worked out of the latest installer!

If you attempt to install over v2.0.0 and/or purge the existing install, you may still run into this bug. If you do, you can clear it so apt can do a successful install or removal:

sudo echo "" > /var/lib/dpkg/info/autohosts.postrm

The new version also has a new whitelist capability, so give it a run when you can!

(Be sure to back up ~/autohosts before upgrading!)

frickymind commented 5 years ago

Many thanks for the update and info! -- Securely sent with Tutanota. Get your own encrypted, ad-free mailbox: https://tutanota.com

29 Jul 2019, 04:50 by notifications@github.com:

Finally got a chance to run some tests on this - the bugs should be worked out of the latest installer!

If you attempt to install over v2.0.0 and/or purge the existing install, you may still run into this bug. If you do, you can clear it so apt can do a successful install or removal:

sudo > echo> > "> "> > >> /var/lib/dpkg/info/autohosts.postrm

The new version also has a new whitelist capability, so give it a run when you can!

(Be sure to back up > ~/autohosts> before upgrading!)

— You are receiving this because you authored the thread. Reply to this email directly, > view it on GitHub https://github.com/angela-d/autohosts/issues/5?email_source=notifications&email_token=AMHFYPJQR2B6OGRUFV52GJLQBZLIBA5CNFSM4HSBQOFKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOD27OCZY#issuecomment-515826023> , or > mute the thread https://github.com/notifications/unsubscribe-auth/AMHFYPOLBAWXEMHOVTREBY3QBZLIBANCNFSM4HSBQOFA> .