i enter a command for add docker's official GPG key but i don't have OK in output.
The command is:
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
I realize this is an old question, but hope this helps someone.
I had the same issue with Ubuntu 18.04. In my case the error was:
gpg: no valid OpenPGP data found
What solved the issue for me was running the command below to gain root access:
sudo su -
With root privileges, I once again ran:
root@hostname:~# curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Root access is not necessary to complete the rest of the Docker installation steps.
To leave the root shell either type exit
, or press CTRL + D.
I got the same issue as well, but the output showed me that I have to use root user instead of superuser :
E: This command can only be used by root.
And once I logged in with root user, I can successfully use the original command with the response on my window:
OK
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.