ubuntu安装Samba错误解决办法

ubuntu安装samba提示以下错误:ubuntu

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:ide

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.工具

解决办法:ui

  1. 安装aptitude工具:

root@ubuntu # sudo apt-get install aptitude
ubuntu安装Samba错误解决办法3d

提示已经安装最新版本。orm

  1. 使用 aptitude安装samba

root@ubuntu# sudo aptitude install sambablog

ubuntu安装Samba错误解决办法

输入Y ,赞成接受,但没有包更新。安装应未成功。ci

  1. 检查 并更新 source.list文件
    检查系统版本:
    root@ubuntu:~# lsb_release -rc
    ubuntu安装Samba错误解决办法

修改source.list文件
root@ubuntu# vi /etc/apt/sources.list
ubuntu安装Samba错误解决办法get

  1. 更新source
    root@ubuntu:~# sudo apt-get updateit

  2. 再次安装samba
    root@ubuntu:~o# apt-get install samba
    ubuntu安装Samba错误解决办法

  3. 检查安装成功。

备注:

  1. aptitude 与 apt-get 同样,是 功能极其强大的包管理工具。与 apt-get 不一样的是,aptitude 在处理依赖问题上更佳一些。举例来讲,aptitude 在删除一个包时,会同时删除自己所依赖的包。这样,系统中不会残留无用的包,整个系统更为干净。

  2. 当仍是安装不成功时,需检查源安装库是否配置正确(更新源安装库时须要注意系统的版本)。