为什么我无法安装 rust-doc?

为什么我无法安装 rust-doc?

我刚刚成功安装了 rustc,并且看到 apt 建议我也获取 rust-doc。

 $ sudo apt install rust-doc
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:

The following packages have unmet dependencies.
 rust-doc : Depends: fonts-open-sans but it is not installable
E: Unable to correct problems, you have held broken packages.

我认为我的存储库中可能存在一些虚假的依赖关系;但我特别担心最后一行:

您持有破损的包裹。

我不太清楚那到底是什么意思。

由于我相信其中一些取决于我所使用的存储库,因此我提供了以下信息:

/etc/apt/sources.list:#deb cdrom:[Linux Mint 18.2 _Sonya_ - Release amd64 20170628]/ xenial contrib main non-free
/etc/apt/sources.list.d/maarten-baert-simplescreenrecorder-xenial.list:deb http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu xenial main
/etc/apt/sources.list.d/maarten-baert-simplescreenrecorder-xenial.list:deb-src http://ppa.launchpad.net/maarten-baert/simplescreenrecorder/ubuntu xenial main
/etc/apt/sources.list.d/official-package-repositories.list:# Do not edit this file manually, use Software Sources instead.
/etc/apt/sources.list.d/official-package-repositories.list:
/etc/apt/sources.list.d/official-package-repositories.list:deb http://packages.linuxmint.com sonya main upstream import backport #id:linuxmint_main
/etc/apt/sources.list.d/official-package-repositories.list:
/etc/apt/sources.list.d/official-package-repositories.list:deb http://archive.ubuntu.com/ubuntu xenial main restricted universe multiverse
/etc/apt/sources.list.d/official-package-repositories.list:deb http://archive.ubuntu.com/ubuntu xenial-updates main restricted universe multiverse
/etc/apt/sources.list.d/official-package-repositories.list:deb http://archive.ubuntu.com/ubuntu xenial-backports main restricted universe multiverse
/etc/apt/sources.list.d/official-package-repositories.list:
/etc/apt/sources.list.d/official-package-repositories.list:deb http://security.ubuntu.com/ubuntu/ xenial-security main restricted universe multiverse
/etc/apt/sources.list.d/official-package-repositories.list:deb http://archive.canonical.com/ubuntu/ xenial partner
/etc/apt/sources.list.d/vscode.list:### THIS FILE IS AUTOMATICALLY CONFIGURED ###
/etc/apt/sources.list.d/vscode.list:# You may comment out this entry, but any other modifications may be lost.
/etc/apt/sources.list.d/vscode.list:deb [arch=amd64] http://packages.microsoft.com/repos/vscode stable main

为了回应 David Postill 的评论,他建议我安装fonts-open-sans

 $ sudo apt-get install fonts-open-sans
[sudo] password for sam: 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package fonts-open-sans is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'fonts-open-sans' has no installation candidate

答案1

rust-doc是 rustup 安装的一部分。如果你已经安装了 rustup,只需运行rustup doc —std

相关内容