This command can only be used by root
11,197
It's the second part of the command that needs to be executed as root
.
sudo wget -O - http://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -
Not super elegant, but it works :)
Author by
splunk
Updated on July 29, 2022Comments
-
splunk almost 2 years
I'm on Ubuntu 16 and I'd like to add a neo4j package. I tried in 3 ways all leading to the same error.
These are my 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 I always get this error message:
ERROR: This command can only be used by root. --2016-11-04 http://debian.neo4j.org/neotechnology.gpg.key Resolving debian.neo4j.org (debian.neo4j.org)... 52.0.233.188 Connecting to 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 to ‘-’ (Broken pipe).
-
user550701 over 2 yearsThere is no need to run
wget
as root. Trywget -O - http://debian.neo4j.org/neotechnology.gpg.key | sudo apt-key add -