DIGITS icon indicating copy to clipboard operation
DIGITS copied to clipboard

Failed to add GPGKEY

Open shinfo001 opened this issue 10 years ago • 14 comments

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.

shinfo001 avatar Mar 24 '16 00:03 shinfo001

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?

lukeyeager avatar Mar 24 '16 18:03 lukeyeager

@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.

smgutstein avatar Apr 21 '17 04:04 smgutstein

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"

shinfo001 avatar Apr 21 '17 08:04 shinfo001

@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 avatar Apr 22 '17 05:04 smgutstein

@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

)

smgutstein avatar Apr 22 '17 05:04 smgutstein

@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.

shinfo001 avatar Apr 23 '17 23:04 shinfo001

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

lukeyeager avatar Apr 25 '17 18:04 lukeyeager

@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))

smgutstein avatar Apr 26 '17 04:04 smgutstein

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.

jiffe avatar May 26 '17 00:05 jiffe

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.

yweweler avatar Jun 01 '17 18:06 yweweler

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

FangliangBai avatar Jun 07 '17 15:06 FangliangBai

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

wangtianren avatar Sep 01 '17 23:09 wangtianren

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

温馨提示

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

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

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

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

            	 备案咨询电话:021-36359595

you need confirm you down load real key file

zdx3578 avatar May 18 '18 13:05 zdx3578

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

MrZhengXin avatar Mar 02 '19 11:03 MrZhengXin