Nvidia-docker: dpkg: error processing package nvidia-docker (--install)

Created on 3 Mar 2017  Β·  13Comments  Β·  Source: NVIDIA/nvidia-docker

Setting up permissions
chown: invalid spec: β€˜nvidia-docker:’
dpkg: error processing package nvidia-docker (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
nvidia-docker

All 13 comments

Which distribution do you have? And what was your exact command?

I tried to install 'nvidia-docker' yesterday after i installed the latest docker.but i encountered with this problem.

I followed this

Install nvidia-docker and nvidia-docker-plugin

wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
sudo dpkg -i /tmp/nvidia-docker.deb && rm /tmp/nvidia-docker.deb

instructions in the quick start page,but i failed.
would you please help me solve this problem?
Thanks

i have installed nvidia dirver 367,cuda8.0 and the latest docker ce.my gpu is GTX970.
The problem is
Setting up permissions
chown: invalid spec: β€˜nvidia-docker:’
dpkg: error processing package nvidia-docker (--install):
subprocess installed post-installation script returned error exit status 1
Processing triggers for ureadahead (0.100.0-19) ...
Errors were encountered while processing:
nvidia-docker

my system is Ubuntu 16.04

Make sure the user nvidia-docker exists on your system.
To start fresh:

apt-get purge nvidia-docker
wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb

I tried the instruction you given,and the response was given like this:

ymd@ymd:~$ sudo apt-get purge nvidia-docker
[sudo] password for ymd: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following packages will be REMOVED:
  nvidia-docker*
0 upgraded, 0 newly installed, 1 to remove and 228 not upgraded.
1 not fully installed or removed.
After this operation, 14.1 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 225956 files and directories currently installed.)
Removing nvidia-docker (1.0.1-1) ...
Purging NVIDIA volumes
Purging configuration files for nvidia-docker (1.0.1-1) ...

ymd@ymd:~$ wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
--2017-03-04 14:47:27--  https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
Resolving github.com (github.com)... 192.30.253.113, 192.30.253.112
Connecting to github.com (github.com)|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 302 Found
Location: https://github-cloud.s3.amazonaws.com/releases/45557469/d4efc7cc-ff73-11e6-91a2-ce84b8670fcd.deb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170304%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170304T064728Z&X-Amz-Expires=300&X-Amz-Signature=ea4c8613ba93e65d1a1a9b0f2303793b6720a3803c4239a8c0c9f4a5436a88fb&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnvidia-docker_1.0.1-1_amd64.deb&response-content-type=application%2Foctet-stream [following]
--2017-03-04 14:47:28--  https://github-cloud.s3.amazonaws.com/releases/45557469/d4efc7cc-ff73-11e6-91a2-ce84b8670fcd.deb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=AKIAISTNZFOVBIJMK3TQ%2F20170304%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20170304T064728Z&X-Amz-Expires=300&X-Amz-Signature=ea4c8613ba93e65d1a1a9b0f2303793b6720a3803c4239a8c0c9f4a5436a88fb&X-Amz-SignedHeaders=host&actor_id=0&response-content-disposition=attachment%3B%20filename%3Dnvidia-docker_1.0.1-1_amd64.deb&response-content-type=application%2Foctet-stream
Resolving github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)... 54.231.32.115
Connecting to github-cloud.s3.amazonaws.com (github-cloud.s3.amazonaws.com)|54.231.32.115|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2266050 (2.2M) [application/octet-stream]
Saving to: β€˜/tmp/nvidia-docker_1.0.1-1_amd64.deb.1’

nvidia-docker_1.0.1 100%[===================>]   2.16M  29.6KB/s    in 66s     

2017-03-04 14:48:35 (33.6 KB/s) - β€˜/tmp/nvidia-docker_1.0.1-1_amd64.deb.1’ saved [2266050/2266050]

**ymd@ymd:~$ sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb**
Selecting previously unselected package nvidia-docker.
(Reading database ... 225947 files and directories currently installed.)
Preparing to unpack .../nvidia-docker_1.0.1-1_amd64.deb ...
Unpacking nvidia-docker (1.0.1-1) ...
Setting up nvidia-docker (1.0.1-1) ...
Configuring user
Setting up permissions
Job for nvidia-docker.service failed because the control process exited with error code. See "systemctl status nvidia-docker.service" and "journalctl -xe" for details.
nvidia-docker.service couldn't start.
Processing triggers for ureadahead (0.100.0-19) ...

**ymd@ymd:~$ systemctl status nvidia-docker.service**
● nvidia-docker.service - NVIDIA Docker plugin
   Loaded: loaded (/lib/systemd/system/nvidia-docker.service; enabled; vendor pr
   Active: inactive (dead) (Result: exit-code) since ε…­ 2017-03-04 14:50:01 CST; 
     Docs: https://github.com/NVIDIA/nvidia-docker/wiki
  Process: 17683 ExecStopPost=/bin/rm -f $SPEC_FILE (code=exited, status=0/SUCCE
  Process: 17678 ExecStartPost=/bin/sh -c /bin/echo unix://$SOCK_DIR/nvidia-dock
  Process: 17667 ExecStartPost=/bin/sh -c /bin/mkdir -p $( dirname $SPEC_FILE ) 
  Process: 17666 ExecStart=/usr/bin/nvidia-docker-plugin -s $SOCK_DIR (code=exit
 Main PID: 17666 (code=exited, status=1/FAILURE)

3月 04 14:50:00 ymd systemd[1]: **Failed to start NVIDIA Docker plugin.**
3月 04 14:50:00 ymd systemd[1]: nvidia-docker.service: Unit entered failed state.
3月 04 14:50:00 ymd systemd[1]: nvidia-docker.service: Failed with result 'exit-c
3月 04 14:50:01 ymd systemd[1]: nvidia-docker.service: Service hold-off time over
3月 04 14:50:01 ymd systemd[1]: Stopped NVIDIA Docker plugin.
3月 04 14:50:01 ymd systemd[1]: nvidia-docker.service: Start request repeated too
3月 04 14:50:01 ymd systemd[1]: **Failed to start NVIDIA Docker plugin.**

**ymd@ymd:~$ journalctl -xe**
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nvidia-docker.service has failed.
-- 
-- The result is failed.
3月 04 14:50:00 ymd systemd[1]: nvidia-docker.service: Unit entered failed state.
3月 04 14:50:00 ymd systemd[1]: nvidia-docker.service: Failed with result 'exit-c
3月 04 14:50:01 ymd systemd[1]: nvidia-docker.service: Service hold-off time over
3月 04 14:50:01 ymd systemd[1]: Stopped NVIDIA Docker plugin.
-- Subject: Unit nvidia-docker.service has finished shutting down
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nvidia-docker.service has finished shutting down.
3月 04 14:50:01 ymd systemd[1]: nvidia-docker.service: Start request repeated too
**3月 04 14:50:01 ymd systemd[1]: Failed to start NVIDIA Docker plugin.**
-- Subject: Unit nvidia-docker.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
-- 
-- Unit nvidia-docker.service has failed.
-- 
-- The result is failed.
ymd@ymd:~$ 

What's the output of journalctl -u nvidia-docker?

the output is following.and the bolded lines were written in red.thank you @3XX0

ymd@ymd:~$ journalctl -u nvidia-docker
-- Logs begin at δΊ” 2017-03-03 20:55:12 CST, end at ζ—₯ 2017-03-05 16:43:38 CST. --
3月 03 20:55:21 ymd systemd[1]: Starting NVIDIA Docker plugin...
3月 03 20:55:21 ymd systemd[1]: nvidia-docker.service: Main process exited, code=
3月 03 20:55:21 ymd systemd[1]: nvidia-docker.service: Control process exited, co
3月 03 20:55:21 ymd systemd[1]: nvidia-docker.service: Control process exited, co
3月 03 20:55:21 ymd systemd[1]: Failed to start NVIDIA Docker plugin.
3月 03 20:55:21 ymd systemd[1]: nvidia-docker.service: Unit entered failed state.
3月 03 20:55:21 ymd systemd[1]: nvidia-docker.service: Failed with result 'exit-c
3月 03 20:55:22 ymd systemd[1]: nvidia-docker.service: Service hold-off time over
3月 03 20:55:22 ymd systemd[1]: Stopped NVIDIA Docker plugin.
3月 03 20:55:22 ymd systemd[1]: Starting NVIDIA Docker plugin...
3月 03 20:55:22 ymd systemd[1]: nvidia-docker.service: Main process exited, code=
3月 03 20:55:22 ymd systemd[1]: nvidia-docker.service: Control process exited, co
3月 03 20:55:22 ymd systemd[1]: nvidia-docker.service: Control process exited, co
3月 03 20:55:22 ymd systemd[1]: Failed to start NVIDIA Docker plugin.
3月 03 20:55:22 ymd systemd[1]: nvidia-docker.service: Unit entered failed state.
3月 03 20:55:22 ymd systemd[1]: nvidia-docker.service: Failed with result 'exit-c
3月 03 20:55:23 ymd systemd[1]: nvidia-docker.service: Service hold-off time over
3月 03 20:55:23 ymd systemd[1]: Stopped NVIDIA Docker plugin.
3月 03 20:55:23 ymd systemd[1]: Starting NVIDIA Docker plugin...
3月 03 20:55:23 ymd systemd[1]: nvidia-docker.service: Main process exited, code=
3月 03 20:55:23 ymd systemd[1]: nvidia-docker.service: Control process exited, co
3月 03 20:55:23 ymd systemd[1]: nvidia-docker.service: Control process exited, co

This is weird you should have more logs than that.
Can you try starting the plugin manually to see what happens: sudo nvidia-docker-plugin?

It showed this:
ymd@ymd:~$ sudo nvidia-docker-plugin
nvidia-docker-plugin | 2017/03/05 20:00:05 Loading NVIDIA unified memory
nvidia-docker-plugin | 2017/03/05 20:00:05 Loading NVIDIA management library
nvidia-docker-plugin | 2017/03/05 20:00:05 Discovering GPU devices
nvidia-docker-plugin | 2017/03/05 20:00:06 Provisioning volumes at /var/lib/nvidia-docker/volumes
nvidia-docker-plugin | 2017/03/05 20:00:06 Serving plugin API at /run/docker/plugins
nvidia-docker-plugin | 2017/03/05 20:00:06 Serving remote API at localhost:3476

@3XX0 thangks

this morning i tried this again
ymd@ymd:~$ sudo apt-get purge nvidia-docker
[sudo] password for ymd:
E: Could not get lock /var/lib/dpkg/lock - open (11: Resource temporarily unavailable)
E: Unable to lock the administration directory (/var/lib/dpkg/), is another process using it?

the information is different with that of last time.

then i found the solution about this through the internet.after doing sudo rm/var/lib/apt/lists/lock,
i tried your instruction

apt-get purge nvidia-docker
wget -P /tmp https://github.com/NVIDIA/nvidia-docker/releases/download/v1.0.1/nvidia-docker_1.0.1-1_amd64.deb
sudo dpkg -i /tmp/nvidia-docker*.deb && rm /tmp/nvidia-docker*.deb

again .
this time,i can run my python file using nvidia-docker successfully,so thank you @3XX0 @flx42

For me doing what worked for Elliexx results in

dpkg: error processing archive /tmp/nvidia-docker_1.0.1-1_amd64.deb (--install):
subprocess new pre-removal script returned error exit status 102
dpkg: error while cleaning up:
subprocess installed post-installation script returned error exit status 102
Errors were encountered while processing:
/tmp/nvidia-docker_1.0.1-1_amd64.deb

I got the same error log as @hack-r when install nvidia-docker using dkpg on debian 8.
Debian 3.16.36-1+deb8u2 (2016-10-19) x86_64 GNU/Linux

Was this page helpful?
0 / 5 - 0 ratings