16.04 - This command can only be used by root - Ask Ubuntu


i'm on ubuntu 16 , i'd add neo4j package. tried in 3 ways leading same error.

these attempts:

wget -o - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add -  sudo wget -o - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add -  sudo -i wget -o - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add - 

but error message:

error: command can used root. --2016-11-04  http://debian.neo4j.org/neotechnology.gpg.key resolving debian.neo4j.org (debian.neo4j.org)... 52.0.233.188 connecting debian.neo4j.org (debian.neo4j.org)|52.0.233.188|:80... connected. http request sent, awaiting response... 200 ok length: 4791 (4,7k) [application/octet-stream] saving to: ‘stdout’  -                     0%[                    ]       0  --.-kb/s    in 0s         cannot write ‘-’ (broken pipe). 

you need change wget command from:

sudo wget -o - http://debian.neo4j.org/neotechnology.gpg.key | apt-key add - 

to:

sudo wget http://debian.neo4j.org/neotechnology.gpg.key | apt-key add - 

from man pages wget...

   -o file    --output-document=file        documents not written appropriate files,        concatenated , written file.  if - used        file, documents printed standard output, disabling link        conversion. 

Comments

Popular posts from this blog

download - Firefox cannot save files (most of the time), how to solve? - Super User

windows - "-2146893807 NTE_NOT_FOUND" when repair certificate store - Super User

sql server - "Configuration file does not exist", Event ID 274 - Super User