Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Failed to add GPGKEY #653

Closed
shinfo001 opened this issue Mar 24, 2016 · 14 comments
Closed

Failed to add GPGKEY #653

shinfo001 opened this issue Mar 24, 2016 · 14 comments

Comments

@shinfo001
Copy link

Is there any way that you can improve the next of messages that occur during the installation ?

$ sudo dpkg -i $ CUDA_REPO_PKG

Failed to add GPGKEY at http://developer.download.nvidia.com/compute/cuda/repos/GPGKEY to apt keys.

@lukeyeager
Copy link
Member

Improving the error messages
Without seeing your actual list of messages, I'm not sure what the problem is. I would assume that any error messages you're seeing are coming from dpkg and/or apt-get and are not related to anything that NVIDIA has done when creating the CUDA repo package.

GPGKEY error
Did you resolve this error? I've never seen it before. Do you have internet access on the machine?

@smgutstein
Copy link

@lukeyeager - I've just come across this same problem. I was following instructions to install on Ubuntu 16.04. Here is more detailed info if it helps:

me@Bedrock:~/Downloads$ wget "$ML_REPO_PKG" -O /tmp/ml-repo.deb && sudo dpkg -i /tmp/ml-repo.deb && rm -f /tmp/ml-repo.deb
--2017-04-21 00:26:25--  http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb
Resolving developer.download.nvidia.com (developer.download.nvidia.com)... 23.211.124.73, 23.211.124.57
Connecting to developer.download.nvidia.com (developer.download.nvidia.com)|23.211.124.73|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2816 (2.8K) [application/x-deb]
Saving to: ‘/tmp/ml-repo.deb’

/tmp/ml-repo.deb                                 100%[=========================================================================================================>]   2.75K  --.-KB/s    in 0s      

2017-04-21 00:26:26 (236 MB/s) - ‘/tmp/ml-repo.deb’ saved [2816/2816]

(Reading database ... 501811 files and directories currently installed.)
Preparing to unpack /tmp/ml-repo.deb ...
Unpacking nvidia-machine-learning-repo-ubuntu1604 (1.0.0-1) over (1.0.0-1) ...
Setting up nvidia-machine-learning-repo-ubuntu1604 (1.0.0-1) ...
gpg: no valid OpenPGP data found.
Failed to add GPGKEY at http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/7fa2af80.pub to apt keys.

I'm going to Google around, if I find a solution or a more directed quetsion, I'll post it.

@shinfo001
Copy link
Author

shinfo001 commented Apr 21, 2017

Hi, this problem has been solved.
The cause is in the network proxy.
Under the proxy, DIGITS document does not work.

Under the proxy, to use the sudo command,
I added the following setting to /etc/sudoers beforehand

Defaults env_keep += "http_proxy https_proxy ftp_proxy"

@smgutstein
Copy link

@shinfo001 - Alas, I don't think that solves my problem. Here is my (new) sudoers file:

#
# This file MUST be edited with the 'visudo' command as root.
#
# Please consider adding local content in /etc/sudoers.d/ instead of
# directly modifying this file.
#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
Defaults	mail_badpass
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"
Defaults	env_keep += "http_proxy https_proxy ftp_proxy"
# Host alias specification

# User alias specification

# Cmnd alias specification

# User privilege specification
root	ALL=(ALL:ALL) ALL

# Members of the admin group may gain root privileges
%admin ALL=(ALL) ALL

# Allow members of group sudo to execute any command
%sudo	ALL=(ALL:ALL) ALL

# See sudoers(5) for more information on "#include" directives:

#includedir /etc/sudoers.d

Is this what your sudoers file looks like?

@smgutstein
Copy link

smgutstein commented Apr 22, 2017

@lukeyeager - I think I have a more directed question: Is there a difference between the CUDA_REPO_PKG and the ML_REPO_PKG given in https://github.com/NVIDIA/DIGITS/blob/digits-5.0/docs/UbuntuInstall.md. I ask because
wget "$CUDA_REPO_PKG" -O /tmp/cuda-repo.deb && sudo dpkg -i /tmp/cuda-repo.deb && rm -f /tmp/cuda-repo.deb

works fine, but my problem comes with

wget "$ML_REPO_PKG" -O /tmp/ml-repo.deb && sudo dpkg -i /tmp/ml-repo.deb && rm -f /tmp/ml-repo.deb

Does this make any sense?

(Note: Just to reiterate, The value I used for ML_REPO_PKG was:

ML_REPO_PKG=http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/nvidia-machine-learning-repo-ubuntu1604_1.0.0-1_amd64.deb

)

@shinfo001
Copy link
Author

@smgutstein It's my sudoers file

...

#
# See the man page for details on how to write a sudoers file.
#
Defaults	env_reset
Defaults timestamp_timeout=120
Defaults env_keep += "http_proxy https_proxy ftp_proxy"
Defaults	mail_badpass
Defaults	secure_path="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/snap/bin"

...


,and my install sh (for ubuntu 14.04)

# install cuda

CUDA_REPO_PKG=cuda-repo-ubuntu1404_7.5-18_amd64.deb
wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1404/x86_64/${CUDA_REPO_PKG} -O /tmp/${CUDA_REPO_PKG}
sudo dpkg -i /tmp/${CUDA_REPO_PKG}
sudo rm -f /tmp/${CUDA_REPO_PKG}
ML_REPO_PKG=nvidia-machine-learning-repo-ubuntu1404_4.0-2_amd64.deb
wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/${ML_REPO_PKG} -O /tmp/${ML_REPO_PKG}
sudo dpkg -i /tmp/${ML_REPO_PKG}
sudo rm -f /tmp/${ML_REPO_PKG}

sudo apt-get update

if does not work, Please remove 'sudo' and retry with su (root user)

If it does not work with ubuntu16, it may be a package problem.

@lukeyeager
Copy link
Member

Check the URLs. Don't try to install a Ubuntu 14.04 package on a 16.04 system.
https://github.com/NVIDIA/DIGITS/blob/digits-5.0/docs/UbuntuInstall.md#prerequisites

@smgutstein
Copy link

@shinfo001 I tried your sudoers file and still had the same problem. However, I downloaded nv-deep-learning-repo-ubuntu1604-ga-cuda8.0-digits5.0_1-1_amd64.deb from NVIDIA's website and installed it using the ubuntu software installer. I just brought up DIGITS on my browser (after making a /var/www/.python-eggs dir & making it writeable by the world (which worries me a little))

@jiffe
Copy link

jiffe commented May 26, 2017

The pub file URL returns a 404.
http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1604/x86_64/7fa2af80.pub

This appears to be a step the deb file is trying to do itself as importing http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/7fa2af80.pub didn't resolve it.

I was able to get around this by redirecting developer.download.nvidia.com to my own web server and placing the 1404 7fa2af80.pub on it so the deb installation would finish correctly, I think this file needs to be replaced in the 1604 directory.

@yweweler
Copy link

yweweler commented Jun 1, 2017

In case there are more people like me still having trouble with the missing key file for ML_REPO_PKG.
Here are some lines for convenience:

Download the .deb file manualy:

wget "$ML_REPO_PKG" -O /tmp/ml-repo.deb

Create nvidia target folder structure to host the key yourself.

mkdir -p /tmp/compute/machine-learning/repos/ubuntu1604/x86_64/

Download key file.

wget http://developer.download.nvidia.com/compute/machine-learning/repos/ubuntu1404/x86_64/7fa2af80.pub -O /tmp/compute/machine-learning/repos/ubuntu1604/x86_64/fa2af80.pub

Add the following line to your /etc/hosts file.

127.0.0.1 developer.download.nvidia.com

Host the file manually using python3.

cd /tmp
python3 -m http.server 80

Install the .deb file.

sudo dpkg -i /tmp/ml-repo.deb && rm -f /tmp/ml-repo.deb

Shutdown the python server.
Remove the added line from /etc/hosts.
Remove created folders.

@FangliangBai
Copy link

FangliangBai commented Jun 7, 2017

If I may slightly modify @yweweler 's solution at some steps below. These work for me:

Download key file.

  1. after this step, change the name fa2af80.pub to 7fa2af80.pub

Add the following line to your /etc/hosts file.

  1. use sudo gedit /etc/hosts to access the hosts file

127.0.0.1 developer.download.nvidia.com

  1. if in /etc/hosts file the first line is 127.0.0.1 localhost, comment that with # 127.0.0.1 localhost and add 127.0.0.1 developer.download.nvidia.com

python3 -m http.server 80

  1. use sudo python3 -m http.server 80 to start the server

Shutdown the python server.

  1. use Ctrl + C to shutdown the Python server

@wangtianren
Copy link

Problem solved from @yweweler and @FangliangBai 's posts. Just one thing, that when downloading the keyfile to /tmp/*, make sure the key is 7fa2af80.pub instead of fa2af80.pub

@zdx3578
Copy link

zdx3578 commented May 18, 2018

why error?? one reason is great wall block down pub key

wget http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
--2018-05-18 21:15:54-- http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
正在解析主机 developer.download.nvidia.com (developer.download.nvidia.com)... 58.223.168.57, 58.223.168.56, 58.223.168.55, ...
正在连接 developer.download.nvidia.com (developer.download.nvidia.com)|58.223.168.57|:80... 已连接。
已发出 HTTP 请求,正在等待回应... 302 Found
位置:http://114.80.80.238:8089/ceshi/index.html [跟随至新的 URL]
--2018-05-18 21:15:54-- http://114.80.80.238:8089/ceshi/index.html
正在连接 114.80.80.238:8089... 已连接。
已发出 HTTP 请求,正在等待回应... 200 OK
长度: 691 [text/html]
正在保存至: “7fa2af80.pub”

7fa2af80.pub 100%[========================================================>] 691 --.-KB/s in 0s

2018-05-18 21:15:55 (77.3 MB/s) - 已保存 “7fa2af80.pub” [691/691])

linpan@jizhi:~$ cat 7fa2af80.pub

<title>温馨提示</title>

     	         温馨提示:该网站暂时无法访问

         根据工信部相关法规,由于您的网站尚未备案,该网站无法访问。

    	 按照国家工业和信息化部33号令规定:未取得备案号的网站不得解
         析和开通,否则需承担相关的法律责任。
    	 
                 请各企事业单位务必完成备案后再开通网站,谢谢支持!

    	         世纪互联备案咨询相关联系方式

            	 备案咨询电话:021-36359595

you need confirm you down load real key file

@MrZhengXin
Copy link

Just click the link in your browser, download it manually, and add it by
sudo apt-key add 7fa2af80.pub

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants