无法安装 Samba

无法安装 Samba

我一直尝试使用这个终端提示来安装 Samba:

sudo apt-get install samba

这是我收到的回复:

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:
  samba : Depends: samba-common (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.1.6+dfsg-1ubuntu2.14.04.2 is to be installed
  Depends: samba-common-bin (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.1.6+dfsg-1ubuntu2.14.04.2 is to be installed
  Depends: samba-dsdb-modules but it is not going to be installed
  Depends: samba-libs (= 2:4.1.6+dfsg-1ubuntu2) but 2:4.1.6+dfsg-1ubuntu2.14.04.2 is to be installed
  Recommends: attr but it is not going to be installed
  Recommends: samba-vfs-modules but it is not going to be installed
E: Unable to correct problems, you have held broken packages.

我接下来要去哪里?

答案1

首先你需要运行

sudo apt-get 更新

然后你可以输入以下命令来搜索与 samba 相关的可用软件包

sudo apt-cache 搜索 samba | grep samba

如果软件包只安装了一半,你可以使用以下命令修复损坏的软件包

sudo apt-get -f 安装

希望这有帮助,祝你好运。

相关内容