Thanks so much, very helpful. I went ahead and tried to install node 14 on my debian release and got this error and tried version 12 and the same thing:
I had tried running it under sudo and not under sudo and got the same thing as well. I checked if apt was running as a background process which it wasn't, but restarted the server anyways (its not in production) and after the restart I got the same error.
I also executed this line manually which worked: chmod 0700 of directory /var/lib/apt/lists/partial but rerunning the curl command didn't make any difference and still told me it couldn't change this directories permissions.
Any thoughts on what I could try next?
sudo curl -sL https://deb.nodesource.com/setup_12.x | bash -
tput: unknown terminal "xterm-256color"
## Installing the NodeSource Node.js 12.x repo...
## Populating apt-get cache...
+ apt-get update
Reading package lists... Done
W: chmod 0700 of directory /var/lib/apt/lists/partial failed - SetupAPTPartialDirectory (1: Operation not permitted)
E: Could not open lock file /var/lib/apt/lists/lock - open (13: Permission denied)
E: Unable to lock directory /var/lib/apt/lists/
W: Problem unlinking the file /var/cache/apt/pkgcache.bin - RemoveCaches (13: Permission denied)
W: Problem unlinking the file /var/cache/apt/srcpkgcache.bin - RemoveCaches (13: Permission denied)
Error executing command, exiting