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).
[userA@rhel7 ~]$ su - Password: It's asking for the password of superuser.
To run commands with superuser privileges, use the sudo command. sudo stands for superuser do. You're asked for the password of the current user. You're asked to enter the password for adminUsername, after which a new shell is opened for that user.
To use a "root" terminal, type "sudo -i" at the command line. The entire group of default graphical configuration tools in Kubuntu already uses sudo, so you will be prompted for your password if needed using kdesu, which is a graphical frontend to sudo.
bash - This command can only be used by root - Stack Overflow.
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 :)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With