安装 elasticsearch 时出现 nvidia-cuda-dev 包损坏的错误

安装 elasticsearch 时出现 nvidia-cuda-dev 包损坏的错误

我正在尝试使用以下命令在我的远程机器上安装 elasticsearch ...

wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add -

sudo apt-get install apt-transport-https

echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list

sudo apt-get update && sudo apt-get install elasticsearch 

安装时出现以下错误

以下软件包有未满足的依赖项:nvidia-cuda-toolkit:依赖:nvidia-cuda-dev (= 9.1.85-3ubuntu1) 但无法安装 E:未满足的依赖项。尝试不使用任何软件包执行“apt --fix-broken install”(或指定解决方案)。

我尝试过类似的解决方案

apt --fix-broken install

我收到错误

apt --fix-broken install
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libllvm9
Use 'apt autoremove' to remove it.
The following additional packages will be installed:
  nvidia-cuda-dev
Recommended packages:
  libnvcuvid1
The following NEW packages will be installed:
  nvidia-cuda-dev
0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded.
1 not fully installed or removed.
Need to get 0 B/263 MB of archives.
After this operation, 734 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 175495 files and directories currently installed.)
Preparing to unpack .../nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-cuda-dev (9.1.85-3ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/cublas.h', which is also in package libcublas-dev 10.2.1.243-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
**Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)**

我也试过

sudo apt -f install

我收到错误

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Correcting dependencies... Done
The following package was automatically installed and is no longer required:
  libllvm9
Use 'sudo apt autoremove' to remove it.
The following additional packages will be installed:
  nvidia-cuda-dev
Recommended packages:
  libnvcuvid1
The following NEW packages will be installed:
  nvidia-cuda-dev
0 upgraded, 1 newly installed, 0 to remove and 38 not upgraded.
1 not fully installed or removed.
Need to get 0 B/263 MB of archives.
After this operation, 734 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
(Reading database ... 175495 files and directories currently installed.)
Preparing to unpack .../nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb ...
Unpacking nvidia-cuda-dev (9.1.85-3ubuntu1) ...
dpkg: error processing archive /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb (--unpack):
 trying to overwrite '/usr/include/cublas.h', which is also in package libcublas-dev 10.2.1.243-1
dpkg-deb: error: paste subprocess was killed by signal (Broken pipe)
**Errors were encountered while processing:
 /var/cache/apt/archives/nvidia-cuda-dev_9.1.85-3ubuntu1_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)**

请建议如何通过这个

答案1

尝试运行此命令:

sudo apt install cuda-toolkit-9-1

这个对我有用。

相关内容