在 Ubuntu 16.04 中安装 CUDA 8 .deb 文件出错

在 Ubuntu 16.04 中安装 CUDA 8 .deb 文件出错

我正在尝试通过文件解压 Ubuntu 16.04 上的 CUDA 8。.deb当我运行命令时,sudo dpkg -i cuda-repo-ubuntu1604-8-0-rc_8.0.27-1_amd64.deb出现以下错误:

(Reading database ... 172697 files and directories currently installed.)
Preparing to unpack cuda-repo-ubuntu1604-8-0-rc_8.0.27-1_amd64.deb ...
Unpacking cuda-repo-ubuntu1604-8-0-rc (8.0.27-1) ...
dpkg-deb (subprocess): cannot copy archive member from 'cuda-repo-ubuntu1604-8-0-rc_8.0.27-1_amd64.deb' to decompressor pipe: unexpected end of file or stream
dpkg-deb: error: subprocess paste returned error exit status 2
dpkg: error processing archive cuda-repo-ubuntu1604-8-0-rc_8.0.27-1_amd64.deb (--install):
cannot copy extracted data for './var/cuda-repo-8-0-rc/cuda-cufft-cross-armhf-8-0_8.0.27-1_armhf.deb' to '/var/cuda-repo-8-0-rc/cuda-cufft-cross-armhf-8-0_8.0.27-1_armhf.deb.dpkg-new': unexpected end of file or stream
Errors were encountered while processing:
cuda-repo-ubuntu1604-8-0-rc_8.0.27-1_amd64.deb

答案1

我猜你已经安装了 CUDA 8 的测试版,现在你正在尝试安装稳定版。我也遇到过类似的问题。

尝试使用--force-overwrite标志

sudo dpkg -i --force-overwrite cuda-repo-ubuntu1604-8-0-rc_8.0.27-1_amd64.deb

在接下来出现的屏幕上,选择Y确认覆盖。

相关内容