root@ubuntu# 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: update-inetd but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
解决办法:
root@ubuntu # sudo apt-get install aptitude
提示已经安装最新版本。
root@ubuntu# sudo aptitude install samba
输入Y ,同意接受,但没有包更新。安装应未成功。
修改source.list文件
root@ubuntu# vi /etc/apt/sources.list
更新source
root@ubuntu:~# sudo apt-get update
再次安装samba
root@ubuntu:~o# apt-get install samba
备注:
aptitude 与 apt-get 一样,是 功能极其强大的包管理工具。与 apt-get 不同的是,aptitude 在处理依赖问题上更佳一些。举例来说,aptitude 在删除一个包时,会同时删除本身所依赖的包。这样,系统中不会残留无用的包,整个系统更为干净。
原文:https://blog.51cto.com/2221384/2548085