无法在 ubuntu 14.04 上安装 samba

无法在 ubuntu 14.04 上安装 samba

尝试安装 samba 并收到此错误

anil@anil:~$ 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.14.04.4) but 2:4.1.6+dfsg-1ubuntu2.14.04.8 is to be installed
         Depends: samba-common-bin (= 2:4.1.6+dfsg-1ubuntu2.14.04.4) but 2:4.1.6+dfsg-1ubuntu2.14.04.8 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.14.04.4) but 2:4.1.6+dfsg-1ubuntu2.14.04.8 is 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 -f install
sudo apt-get install samba

它将安装损坏的依赖项。如果问题没有解决,则使用 关联哪里有很好的解决该问题的解释。

答案2

首先在终端中运行这些命令(按Ctrl+ Alt+ T):

  • sudo apt-get --fix-broken install
  • sudo apt-get clean
  • sudo apt-get autoclean
  • sudo apt-get autoremove
  • sudo dpkg --configure -a
  • sudo apt-get update随后

1.更改软件并更新主服务器

2.取消标记所有“其他软件”来源

IM小号

3.重新加载并运行软件更新。

4.安装samba:sudo apt-get install samba

相关内容