在 ubuntu 18.04 上安装 CUDA 出现错误

在 ubuntu 18.04 上安装 CUDA 出现错误

我的笔记本电脑上有 GeForce 820m,我想安装 cuda,但是出现以下错误:`

Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following additional packages will be installed:
  ca-certificates-java cpp-6 fonts-dejavu-extra g++-6 gcc-6 gcc-6-base
  java-common libaccinj64-9.1 libasan3 libatk-wrapper-java
  libatk-wrapper-java-jni libcublas9.1 libcudart9.1 libcufft9.1 libcufftw9.1
  libcuinj64-9.1 libcurand9.1 libcusolver9.1 libcusparse9.1 libdrm-dev
  libgcc-6-dev libgif7 libgl1-mesa-dev libglvnd-core-dev libglvnd-dev
  libnppc9.1 libnppial9.1 libnppicc9.1 libnppicom9.1 libnppidei9.1 libnppif9.1
  libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1 libnppitc9.1 libnpps9.1
  libnvblas9.1 libnvgraph9.1 libnvidia-compute-390 libnvrtc9.1 libnvtoolsext1
  libnvvm3 libopengl0 libpthread-stubs0-dev libstdc++-6-dev libthrust-dev
  libvdpau-dev libx11-dev libx11-doc libx11-xcb-dev libxau-dev
  libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev
  libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev
  libxcb-xfixes0-dev libxcb1-dev libxdamage-dev libxdmcp-dev libxext-dev
  libxfixes-dev libxshmfence-dev libxxf86vm-dev mesa-common-dev
  nvidia-cuda-dev nvidia-cuda-doc nvidia-cuda-gdb nvidia-opencl-dev
  nvidia-profiler nvidia-visual-profiler ocl-icd-opencl-dev opencl-c-headers
  openjdk-8-jre openjdk-8-jre-headless x11proto-core-dev x11proto-damage-dev
  x11proto-dev x11proto-dri2-dev x11proto-fixes-dev x11proto-gl-dev
  x11proto-xext-dev x11proto-xf86vidmode-dev xorg-sgml-doctools xtrans-dev
Suggested packages:
  gcc-6-locales g++-6-multilib gcc-6-doc libstdc++6-6-dbg gcc-6-multilib
  libgcc1-dbg libgomp1-dbg libitm1-dbg libatomic1-dbg libasan3-dbg
  liblsan0-dbg libtsan0-dbg libubsan0-dbg libcilkrts5-dbg libmpx2-dbg
  libquadmath0-dbg default-jre libstdc++-6-doc libvdpau-doc libxcb-doc
  libxext-doc libcupti-dev nvidia-driver libpoclu-dev icedtea-8-plugin
  fonts-ipafont-gothic fonts-ipafont-mincho fonts-wqy-microhei
  fonts-wqy-zenhei
Recommended packages:
  libnvcuvid1
The following packages will be REMOVED:
  libcuda1-340 nvidia-opencl-icd-340
The following NEW packages will be installed:
  ca-certificates-java cpp-6 fonts-dejavu-extra g++-6 gcc-6 gcc-6-base
  java-common libaccinj64-9.1 libasan3 libatk-wrapper-java
  libatk-wrapper-java-jni libcublas9.1 libcudart9.1 libcufft9.1 libcufftw9.1
  libcuinj64-9.1 libcurand9.1 libcusolver9.1 libcusparse9.1 libdrm-dev
  libgcc-6-dev libgif7 libgl1-mesa-dev libglvnd-core-dev libglvnd-dev
  libnppc9.1 libnppial9.1 libnppicc9.1 libnppicom9.1 libnppidei9.1 libnppif9.1
  libnppig9.1 libnppim9.1 libnppist9.1 libnppisu9.1 libnppitc9.1 libnpps9.1
  libnvblas9.1 libnvgraph9.1 libnvidia-compute-390 libnvrtc9.1 libnvtoolsext1
  libnvvm3 libopengl0 libpthread-stubs0-dev libstdc++-6-dev libthrust-dev
  libvdpau-dev libx11-dev libx11-doc libx11-xcb-dev libxau-dev
  libxcb-dri2-0-dev libxcb-dri3-dev libxcb-glx0-dev libxcb-present-dev
  libxcb-randr0-dev libxcb-render0-dev libxcb-shape0-dev libxcb-sync-dev
  libxcb-xfixes0-dev libxcb1-dev libxdamage-dev libxdmcp-dev libxext-dev
  libxfixes-dev libxshmfence-dev libxxf86vm-dev mesa-common-dev
  nvidia-cuda-dev nvidia-cuda-doc nvidia-cuda-gdb nvidia-cuda-toolkit
  nvidia-opencl-dev nvidia-profiler nvidia-visual-profiler ocl-icd-opencl-dev
  opencl-c-headers openjdk-8-jre openjdk-8-jre-headless x11proto-core-dev
  x11proto-damage-dev x11proto-dev x11proto-dri2-dev x11proto-fixes-dev
  x11proto-gl-dev x11proto-xext-dev x11proto-xf86vidmode-dev
  xorg-sgml-doctools xtrans-dev
0 upgraded, 90 newly installed, 2 to remove and 114 not upgraded.
Need to get 851 MB of archives.
After this operation, 2,035 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Fetched 851 MB in 3min 12s (4,444 kB/s)                                        
Extracting templates from packages: 100%
(Reading database ... 146616 files and directories currently installed.)
Removing libcuda1-340 (340.106-0ubuntu3) ...
Removing nvidia-opencl-icd-340 (340.106-0ubuntu3) ...
Selecting previously unselected package java-common.
(Reading database ... 146601 files and directories currently installed.)
Preparing to unpack .../00-java-common_0.63ubuntu1~02_all.deb ...
Unpacking java-common (0.63ubuntu1~02) ...
Selecting previously unselected package openjdk-8-jre-headless:amd64.
Preparing to unpack .../01-openjdk-8-jre-headless_8u171-b11-0ubuntu0.18.04.1_amd64.deb ...
Unpacking openjdk-8-jre-headless:amd64 (8u171-b11-0ubuntu0.18.04.1) ...
Selecting previously unselected package ca-certificates-java.
Preparing to unpack .../02-ca-certificates-java_20170930ubuntu1_all.deb ...
Unpacking ca-certificates-java (20170930ubuntu1) ...
Selecting previously unselected package gcc-6-base:amd64.
Preparing to unpack .../03-gcc-6-base_6.4.0-17ubuntu1_amd64.deb ...
Unpacking gcc-6-base:amd64 (6.4.0-17ubuntu1) ...
Selecting previously unselected package cpp-6.
Preparing to unpack .../04-cpp-6_6.4.0-17ubuntu1_amd64.deb ...
Unpacking cpp-6 (6.4.0-17ubuntu1) ...
Selecting previously unselected package fonts-dejavu-extra.
Preparing to unpack .../05-fonts-dejavu-extra_2.37-1_all.deb ...
Unpacking fonts-dejavu-extra (2.37-1) ...
Selecting previously unselected package libasan3:amd64.
Preparing to unpack .../06-libasan3_6.4.0-17ubuntu1_amd64.deb ...
Unpacking libasan3:amd64 (6.4.0-17ubuntu1) ...
Selecting previously unselected package libgcc-6-dev:amd64.
Preparing to unpack .../07-libgcc-6-dev_6.4.0-17ubuntu1_amd64.deb ...
Unpacking libgcc-6-dev:amd64 (6.4.0-17ubuntu1) ...
Selecting previously unselected package gcc-6.
Preparing to unpack .../08-gcc-6_6.4.0-17ubuntu1_amd64.deb ...
Unpacking gcc-6 (6.4.0-17ubuntu1) ...
Selecting previously unselected package libstdc++-6-dev:amd64.
Preparing to unpack .../09-libstdc++-6-dev_6.4.0-17ubuntu1_amd64.deb ...
Unpacking libstdc++-6-dev:amd64 (6.4.0-17ubuntu1) ...
Selecting previously unselected package g++-6.
Preparing to unpack .../10-g++-6_6.4.0-17ubuntu1_amd64.deb ...
Unpacking g++-6 (6.4.0-17ubuntu1) ...
Selecting previously unselected package libaccinj64-9.1:amd64.
Preparing to unpack .../11-libaccinj64-9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libaccinj64-9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libatk-wrapper-java.
Preparing to unpack .../12-libatk-wrapper-java_0.33.3-20ubuntu0.1_all.deb ...
Unpacking libatk-wrapper-java (0.33.3-20ubuntu0.1) ...
Selecting previously unselected package libatk-wrapper-java-jni:amd64.
Preparing to unpack .../13-libatk-wrapper-java-jni_0.33.3-20ubuntu0.1_amd64.deb ...
Unpacking libatk-wrapper-java-jni:amd64 (0.33.3-20ubuntu0.1) ...
Selecting previously unselected package libcublas9.1:amd64.
Preparing to unpack .../14-libcublas9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libcublas9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libcudart9.1:amd64.
Preparing to unpack .../15-libcudart9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libcudart9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libcufft9.1:amd64.
Preparing to unpack .../16-libcufft9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libcufft9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libcufftw9.1:amd64.
Preparing to unpack .../17-libcufftw9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libcufftw9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnvidia-compute-390:amd64.
Preparing to unpack .../18-libnvidia-compute-390_390.48-0ubuntu3_amd64.deb ...
Unpacking libnvidia-compute-390:amd64 (390.48-0ubuntu3) ...
dpkg: error processing archive /tmp/apt-dpkg-install-OeEbt1/18-libnvidia-compute-390_390.48-0ubuntu3_amd64.deb (--unpack):
 trying to overwrite '/usr/lib/x86_64-linux-gnu/libnvidia-ml.so', which is also in package nvidia-340 340.106-0ubuntu3
Selecting previously unselected package libcuinj64-9.1:amd64.
Preparing to unpack .../19-libcuinj64-9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libcuinj64-9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libcurand9.1:amd64.
Preparing to unpack .../20-libcurand9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libcurand9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libcusolver9.1:amd64.
Preparing to unpack .../21-libcusolver9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libcusolver9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libcusparse9.1:amd64.
Preparing to unpack .../22-libcusparse9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libcusparse9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libdrm-dev:amd64.
Preparing to unpack .../23-libdrm-dev_2.4.91-2_amd64.deb ...
Unpacking libdrm-dev:amd64 (2.4.91-2) ...
Selecting previously unselected package libgif7:amd64.
Preparing to unpack .../24-libgif7_5.1.4-2_amd64.deb ...
Unpacking libgif7:amd64 (5.1.4-2) ...
Selecting previously unselected package libnppc9.1:amd64.
Preparing to unpack .../25-libnppc9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppc9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppial9.1:amd64.
Preparing to unpack .../26-libnppial9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppial9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppicc9.1:amd64.
Preparing to unpack .../27-libnppicc9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppicc9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppicom9.1:amd64.
Preparing to unpack .../28-libnppicom9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppicom9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppidei9.1:amd64.
Preparing to unpack .../29-libnppidei9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppidei9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppif9.1:amd64.
Preparing to unpack .../30-libnppif9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppif9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppig9.1:amd64.
Preparing to unpack .../31-libnppig9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppig9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppim9.1:amd64.
Preparing to unpack .../32-libnppim9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppim9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppist9.1:amd64.
Preparing to unpack .../33-libnppist9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppist9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppisu9.1:amd64.
Preparing to unpack .../34-libnppisu9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppisu9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnppitc9.1:amd64.
Preparing to unpack .../35-libnppitc9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnppitc9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnpps9.1:amd64.
Preparing to unpack .../36-libnpps9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnpps9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnvblas9.1:amd64.
Preparing to unpack .../37-libnvblas9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnvblas9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnvgraph9.1:amd64.
Preparing to unpack .../38-libnvgraph9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnvgraph9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnvrtc9.1:amd64.
Preparing to unpack .../39-libnvrtc9.1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnvrtc9.1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libpthread-stubs0-dev:amd64.
Preparing to unpack .../40-libpthread-stubs0-dev_0.3-4_amd64.deb ...
Unpacking libpthread-stubs0-dev:amd64 (0.3-4) ...
Selecting previously unselected package xorg-sgml-doctools.
Preparing to unpack .../41-xorg-sgml-doctools_1%3a1.11-1_all.deb ...
Unpacking xorg-sgml-doctools (1:1.11-1) ...
Selecting previously unselected package x11proto-dev.
Preparing to unpack .../42-x11proto-dev_2018.4-4_all.deb ...
Unpacking x11proto-dev (2018.4-4) ...
Selecting previously unselected package x11proto-core-dev.
Preparing to unpack .../43-x11proto-core-dev_2018.4-4_all.deb ...
Unpacking x11proto-core-dev (2018.4-4) ...
Selecting previously unselected package libxau-dev:amd64.
Preparing to unpack .../44-libxau-dev_1%3a1.0.8-1_amd64.deb ...
Unpacking libxau-dev:amd64 (1:1.0.8-1) ...
Selecting previously unselected package libxdmcp-dev:amd64.
Preparing to unpack .../45-libxdmcp-dev_1%3a1.1.2-3_amd64.deb ...
Unpacking libxdmcp-dev:amd64 (1:1.1.2-3) ...
Selecting previously unselected package xtrans-dev.
Preparing to unpack .../46-xtrans-dev_1.3.5-1_all.deb ...
Unpacking xtrans-dev (1.3.5-1) ...
Selecting previously unselected package libxcb1-dev:amd64.
Preparing to unpack .../47-libxcb1-dev_1.13-1_amd64.deb ...
Unpacking libxcb1-dev:amd64 (1.13-1) ...
Selecting previously unselected package libx11-dev:amd64.
Preparing to unpack .../48-libx11-dev_2%3a1.6.4-3_amd64.deb ...
Unpacking libx11-dev:amd64 (2:1.6.4-3) ...
Selecting previously unselected package libvdpau-dev:amd64.
Preparing to unpack .../49-libvdpau-dev_1.1.1-3ubuntu1_amd64.deb ...
Unpacking libvdpau-dev:amd64 (1.1.1-3ubuntu1) ...
Selecting previously unselected package libx11-doc.
Preparing to unpack .../50-libx11-doc_2%3a1.6.4-3_all.deb ...
Unpacking libx11-doc (2:1.6.4-3) ...
Selecting previously unselected package libx11-xcb-dev:amd64.
Preparing to unpack .../51-libx11-xcb-dev_2%3a1.6.4-3_amd64.deb ...
Unpacking libx11-xcb-dev:amd64 (2:1.6.4-3) ...
Selecting previously unselected package libxcb-dri2-0-dev:amd64.
Preparing to unpack .../52-libxcb-dri2-0-dev_1.13-1_amd64.deb ...
Unpacking libxcb-dri2-0-dev:amd64 (1.13-1) ...
Selecting previously unselected package libxcb-dri3-dev:amd64.
Preparing to unpack .../53-libxcb-dri3-dev_1.13-1_amd64.deb ...
Unpacking libxcb-dri3-dev:amd64 (1.13-1) ...
Selecting previously unselected package libxcb-glx0-dev:amd64.
Preparing to unpack .../54-libxcb-glx0-dev_1.13-1_amd64.deb ...
Unpacking libxcb-glx0-dev:amd64 (1.13-1) ...
Selecting previously unselected package libxcb-render0-dev:amd64.
Preparing to unpack .../55-libxcb-render0-dev_1.13-1_amd64.deb ...
Unpacking libxcb-render0-dev:amd64 (1.13-1) ...
Selecting previously unselected package libxcb-randr0-dev:amd64.
Preparing to unpack .../56-libxcb-randr0-dev_1.13-1_amd64.deb ...
Unpacking libxcb-randr0-dev:amd64 (1.13-1) ...
Selecting previously unselected package libxcb-shape0-dev:amd64.
Preparing to unpack .../57-libxcb-shape0-dev_1.13-1_amd64.deb ...
Unpacking libxcb-shape0-dev:amd64 (1.13-1) ...
Selecting previously unselected package libxcb-xfixes0-dev:amd64.
Preparing to unpack .../58-libxcb-xfixes0-dev_1.13-1_amd64.deb ...
Unpacking libxcb-xfixes0-dev:amd64 (1.13-1) ...
Selecting previously unselected package libxcb-sync-dev:amd64.
Preparing to unpack .../59-libxcb-sync-dev_1.13-1_amd64.deb ...
Unpacking libxcb-sync-dev:amd64 (1.13-1) ...
Selecting previously unselected package libxcb-present-dev:amd64.
Preparing to unpack .../60-libxcb-present-dev_1.13-1_amd64.deb ...
Unpacking libxcb-present-dev:amd64 (1.13-1) ...
Selecting previously unselected package x11proto-fixes-dev.
Preparing to unpack .../61-x11proto-fixes-dev_1%3a2018.4-4_all.deb ...
Unpacking x11proto-fixes-dev (1:2018.4-4) ...
Selecting previously unselected package libxfixes-dev:amd64.
Preparing to unpack .../62-libxfixes-dev_1%3a5.0.3-1_amd64.deb ...
Unpacking libxfixes-dev:amd64 (1:5.0.3-1) ...
Selecting previously unselected package x11proto-damage-dev.
Preparing to unpack .../63-x11proto-damage-dev_1%3a2018.4-4_all.deb ...
Unpacking x11proto-damage-dev (1:2018.4-4) ...
Selecting previously unselected package libxdamage-dev:amd64.
Preparing to unpack .../64-libxdamage-dev_1%3a1.1.4-3_amd64.deb ...
Unpacking libxdamage-dev:amd64 (1:1.1.4-3) ...
Selecting previously unselected package x11proto-xext-dev.
Preparing to unpack .../65-x11proto-xext-dev_2018.4-4_all.deb ...
Unpacking x11proto-xext-dev (2018.4-4) ...
Selecting previously unselected package libxext-dev:amd64.
Preparing to unpack .../66-libxext-dev_2%3a1.3.3-1_amd64.deb ...
Unpacking libxext-dev:amd64 (2:1.3.3-1) ...
Selecting previously unselected package libxshmfence-dev:amd64.
Preparing to unpack .../67-libxshmfence-dev_1.3-1_amd64.deb ...
Unpacking libxshmfence-dev:amd64 (1.3-1) ...
Selecting previously unselected package x11proto-xf86vidmode-dev.
Preparing to unpack .../68-x11proto-xf86vidmode-dev_2018.4-4_all.deb ...
Unpacking x11proto-xf86vidmode-dev (2018.4-4) ...
Selecting previously unselected package libxxf86vm-dev:amd64.
Preparing to unpack .../69-libxxf86vm-dev_1%3a1.1.4-1_amd64.deb ...
Unpacking libxxf86vm-dev:amd64 (1:1.1.4-1) ...
Selecting previously unselected package mesa-common-dev:amd64.
Preparing to unpack .../70-mesa-common-dev_18.0.0~rc5-1ubuntu1_amd64.deb ...
Unpacking mesa-common-dev:amd64 (18.0.0~rc5-1ubuntu1) ...
Selecting previously unselected package openjdk-8-jre:amd64.
Preparing to unpack .../71-openjdk-8-jre_8u171-b11-0ubuntu0.18.04.1_amd64.deb ...
Unpacking openjdk-8-jre:amd64 (8u171-b11-0ubuntu0.18.04.1) ...
Selecting previously unselected package x11proto-dri2-dev.
Preparing to unpack .../72-x11proto-dri2-dev_2018.4-4_all.deb ...
Unpacking x11proto-dri2-dev (2018.4-4) ...
Selecting previously unselected package x11proto-gl-dev.
Preparing to unpack .../73-x11proto-gl-dev_2018.4-4_all.deb ...
Unpacking x11proto-gl-dev (2018.4-4) ...
Selecting previously unselected package libglvnd-core-dev:amd64.
Preparing to unpack .../74-libglvnd-core-dev_1.0.0-2ubuntu2_amd64.deb ...
Unpacking libglvnd-core-dev:amd64 (1.0.0-2ubuntu2) ...
Selecting previously unselected package libopengl0:amd64.
Preparing to unpack .../75-libopengl0_1.0.0-2ubuntu2_amd64.deb ...
Unpacking libopengl0:amd64 (1.0.0-2ubuntu2) ...
Selecting previously unselected package libglvnd-dev:amd64.
Preparing to unpack .../76-libglvnd-dev_1.0.0-2ubuntu2_amd64.deb ...
Unpacking libglvnd-dev:amd64 (1.0.0-2ubuntu2) ...
Selecting previously unselected package libgl1-mesa-dev:amd64.
Preparing to unpack .../77-libgl1-mesa-dev_18.0.0~rc5-1ubuntu1_amd64.deb ...
Unpacking libgl1-mesa-dev:amd64 (18.0.0~rc5-1ubuntu1) ...
Selecting previously unselected package libnvtoolsext1:amd64.
Preparing to unpack .../78-libnvtoolsext1_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnvtoolsext1:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libnvvm3:amd64.
Preparing to unpack .../79-libnvvm3_9.1.85-3ubuntu1_amd64.deb ...
Unpacking libnvvm3:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package libthrust-dev.
Preparing to unpack .../80-libthrust-dev_1.9.1~9.1.85-3ubuntu1_all.deb ...
Unpacking libthrust-dev (1.9.1~9.1.85-3ubuntu1) ...
Selecting previously unselected package nvidia-cuda-dev.
Preparing to unpack .../81-nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-cuda-dev (9.1.85-3ubuntu1) ...
Selecting previously unselected package nvidia-cuda-doc.
Preparing to unpack .../82-nvidia-cuda-doc_9.1.85-3ubuntu1_all.deb ...
Unpacking nvidia-cuda-doc (9.1.85-3ubuntu1) ...
Selecting previously unselected package nvidia-cuda-gdb.
Preparing to unpack .../83-nvidia-cuda-gdb_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-cuda-gdb (9.1.85-3ubuntu1) ...
Selecting previously unselected package nvidia-profiler.
Preparing to unpack .../84-nvidia-profiler_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-profiler (9.1.85-3ubuntu1) ...
Selecting previously unselected package opencl-c-headers.
Preparing to unpack .../85-opencl-c-headers_2.2~2018.02.21-gb5c3680-1_all.deb ...
Unpacking opencl-c-headers (2.2~2018.02.21-gb5c3680-1) ...
Selecting previously unselected package ocl-icd-opencl-dev:amd64.
Preparing to unpack .../86-ocl-icd-opencl-dev_2.2.11-1ubuntu1_amd64.deb ...
Unpacking ocl-icd-opencl-dev:amd64 (2.2.11-1ubuntu1) ...
Selecting previously unselected package nvidia-opencl-dev:amd64.
Preparing to unpack .../87-nvidia-opencl-dev_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-opencl-dev:amd64 (9.1.85-3ubuntu1) ...
Selecting previously unselected package nvidia-cuda-toolkit.
Preparing to unpack .../88-nvidia-cuda-toolkit_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-cuda-toolkit (9.1.85-3ubuntu1) ...
Selecting previously unselected package nvidia-visual-profiler.
Preparing to unpack .../89-nvidia-visual-profiler_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-visual-profiler (9.1.85-3ubuntu1) ...
Errors were encountered while processing:
 /tmp/apt-dpkg-install-OeEbt1/18-libnvidia-compute-390_390.48-0ubuntu3_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

答案1

这就是我安装 CUDA 的方法

curl http://archive.ubuntu.com/ubuntu/pool/multiverse/n/nvidia-cuda-toolkit/libnppig9.1_9.1.85-3ubuntu1_amd64.deb > /tmp/libnppig9.1_9.1.85-3ubuntu1_amd64.deb
sudo apt install /tmp/libnppig9.1_9.1.85-3ubuntu1_amd64.deb

然后只需重新运行安装程序。

相关内容