root:could not open file '/etc/apt/sources.list'

I am trying to install nodejs for debian on whonix workstation ,
when I run this command :

curl -sL https://deb.nodesource.com/setup_12.x | bash -

I get this error message :

WARNING:root:could not open file ‘/etc/apt/sources.list’

That’s actually just a follow up issue.

The real issue probably is that the script you’re executing - without verification of software signatures - runs some program which is not installed.

See also:

Notwithstanding what I said above, if you still want to install that way… You could try the following command.

I didn’t test - since I don’t like running software without prior verification of software signatures. Actually I think fetching a script over http or https and then piping it into bash is a very insecure idea.

original as you posted (spaces removed by me):

curl -sL https://deb.nodesource.com/setup_12.x | bash -

modified:

curl -sL https://deb.nodesource.com/setup_12.x | bash -x -

That enables bash xtrace which might show the command which is missing so you might be able to install it.


Download.

scurl-download https://deb.nodesource.com/setup_12.x

Then open it in an editor, understand, study it if possible.

Make executable.

chmod +x setup_12.x

Execute if it is looking good.

./setup_12.x

None of this is an issue derived by Whonix. Same would happen on Debian most likely. Therefore this can also be solved as per Free Support for Whonix ™.

2 Likes