Andrwe / privoxy-blocklist

Script converting AdBlock Plus rules into privoxy format.
The Unlicense
153 stars 39 forks source link

install: cannot create directory ‘/tmp/privoxy-blocklist.sh’: File exists #11

Closed carbolymer closed 2 years ago

carbolymer commented 4 years ago

When trying to run script from /tmp/privoxy-blocklist.sh it fails with the following errors:

$ sudo ./privoxy-blocklist.sh
install: cannot create directory ‘/tmp/privoxy-blocklist.sh’: File exists
./privoxy-blocklist.sh: line 239: /tmp/privoxy-blocklist.sh/privoxy-blocklist.sh.lock: Not a directory
Processing https://easylist-downloads.adblockplus.org/easylistgermany.txt ...

Downloading https://easylist-downloads.adblockplus.org/easylistgermany.txt ...
./privoxy-blocklist.sh: line 86: /tmp/privoxy-blocklist.sh/wget-https:##easylist-downloads.adblockplus.org#easylistgermany.txt.log: Not a directory
cat: '/tmp/privoxy-blocklist.sh/wget-https:##easylist-downloads.adblockplus.org#easylistgermany.txt.log': Not a directory
.. downloading done.
grep: /tmp/privoxy-blocklist.sh/easylistgermany.txt: Not a directory
The list recieved from https://easylist-downloads.adblockplus.org/easylistgermany.txt isn't an AdblockPlus list. Skipped
Processing http://adblockplus.mozdev.org/easylist/easylist.txt ...

Downloading http://adblockplus.mozdev.org/easylist/easylist.txt ...
./privoxy-blocklist.sh: line 86: /tmp/privoxy-blocklist.sh/wget-http:##adblockplus.mozdev.org#easylist#easylist.txt.log: Not a directory
cat: '/tmp/privoxy-blocklist.sh/wget-http:##adblockplus.mozdev.org#easylist#easylist.txt.log': Not a directory
.. downloading done.
grep: /tmp/privoxy-blocklist.sh/easylist.txt: Not a directory
The list recieved from http://adblockplus.mozdev.org/easylist/easylist.txt isn't an AdblockPlus list. Skipped
Andrwe commented 2 years ago

The error messages indicate that you had a file called /tmp/privoxy-blocklist.sh which is preventing the creation of the temporary directory. I assume that you downloaded the script into your /tmp/ directory and ran it from there resulting in this error.

To solve this, either move the script to a different place or change TMPDIR in the config file /etc/conf.d/privoxy-blacklist to a different path.