其实这篇接着上文(一),主要是解决samba安装的问题,中间又是一路曲折。不过这个问题也算是比较典型,有必要记录一下。

#apt-get install smb* 安装失败。其实顺利的话,直接一条这样的命令就过了,上次就是直接过的,不知道这次怎么蹦出来的。

Error:  Unable to correct problems, you have held broken package

这个在使用Ubuntu系统的时候多多少少都碰到过,尤其是用旧版本的系统。

这个记得之前在BlackTrack里面更新中文语音包的时候,遇到过类似的问题,这里算是放在一起总结一下吧。

#apt-get update ,upgrade,dist-upgrade

#apt-get clean, autoclean ,clear cache

#apt-get install build-essential

#aptitude install *** ,purge

#aptitude why-not citadel-mta

#apt-get install -f

Synaptic->Custom Filters->Broken to see what appears to be broken.

以上方法全部执行一遍,大概就可以解决,不过过程中更新会耗不少时间。如果不行的话,添加Ubuntu的更新源,重复上述步骤。

不过我最后解决貌似还不是因为这个,中间我尝试执行#apt-get install smbd*

然后更新了一堆东西,貌似这个过程顺便把samba服务一并安装了,我直接locate 到了smb.conf文件。

后面检查service smbd status, running,果然是装好了。

另一个小插曲:

smbd*安装完后,执行sudo 会有以下错误:

Error :no talloc stackframe at ../source3/param/loadparm.c:4864, leaking memory

这个google一下解决比较简单:http://ubuntuforums.org/showthread.php?t=2214042

#apt-cache policy samba
#apt-get remove libpam-smbpass

总结下:

1、技术问题问google, 不要问某度,这是有经验的程序员和新手程序员效率区分之一;

2、菜鸟遇到问题只会一路google,会陷入问题A——>问题B——>问题C....最后只是参考别人的做法解决了问题,但其实并不明白问题出在哪;大牛遇到问题首先根据自己的知识体系,迅速定位问题到某个局部,最多google一两下就解决了,两种方式效率差距可见一般。

就这两天的记录,基本自己还处于前者,基础知识真是忘记了不少,私房菜有必要再拿出来翻翻了。

Unable to correct problems, you have held broken package的更多相关文章

  1. E: Unable to correct problems, you have held broken packages 解决方法

    在Ubuntu中安装软件的时候经常碰到E: Unable to correct problems, you have held broken packages.的错误,顾名思义是因为某些软件包冲突导致 ...

  2. ubuntu 'Unable to correct problems, you have held broken packages' 错误

    在用apt 安装软件时,有时会用国内的源以加快下载速度. 但是在使用ubuntu 14.04的过程中,这一过程可能会导致错误“Unable to correct problems, you have ...

  3. E: Unable to correct problems, you have held broken packages

    问题: apt install libmysqlclient-dev Reading package lists... DoneBuilding dependency tree       Readi ...

  4. ubuntu16 安装openssh-server 一直安装不上Unable to correct problems, you have held broken packages

    zengqi@zengqi:~$ sudo apt-get install openssh-server Reading package lists... DoneBuilding dependenc ...

  5. 解决 E: Unable to correct problems, you have held broken packages. 问题

    参考: Unable to correct problems, you have held broken packages 环境 Ubuntu 14.04, 64bit 问题 在安装gcc-4.9的时 ...

  6. E: Unable to correct problems, you have held broken packages-之apt-get 下载报依赖问题

    今天在新来了一台ubutnu 18.04 在安装zabbix客户端是报依赖问题 root@VM_0_10:~# apt-get install zabbix-agent Reading package ...

  7. Unable to correct problems, you have held broken packages

    Use aptitude instead of apt-get. It is more intelligent. It not only will handle downgrading conflic ...

  8. 如何解决Ubuntu下的“E: Unable to correct problems, you have held broken packages.”的问题. aptitude

    今天安装build-essential时出现了以下问题,这属于包的依赖. 解决方案: 1,sudo apt-get install aptitude:完成aptitude命令安装 2,sudo apt ...

  9. python-imaging-tk : Depends: python-imaging (= 1.1.7-4ubuntu0.12.04.3) but 3.1.2-0ubuntu1.1 is to be installed E: Unable to corre

    最近,将电脑主机升级到ubuntu16.04,但是需要用到 python-imaging-tk,先是报错: import PIL.ImageTk as ImageTkImportError: No m ...

随机推荐

  1. MySQL乱码问题及字符集实战

    mysql> create database oldboy;Query OK, 1 row affected (0.01 sec) mysql> mysql> mysql> s ...

  2. 【python】self用法详解

    在介绍Python的self用法之前,先来介绍下Python中的类和实例我们知道,面向对象最重要的概念就是类(class)和实例(instance). 类是抽象的模板,比如学生这个抽象的事物,可以用一 ...

  3. NPOI将xls文件解析为DataTable类数据

    using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.I ...

  4. struts转换器

    struts转换器:在B/S应用中,将字符串请求参数转换为相应的数据类型,是MVC框架提供的功能,而Struts2是很好的MVC框架实现者,理所当然,提供了类型转换机制. 一.类型转换的意义 对于一个 ...

  5. CentOS给网站配置Https证书

    1.在腾讯云申请域名的证书 2.配置文件 安装相应模块: yum install mod_ssl openssl 编辑配置文件: cd /etc/httpd/conf.d vi jerryqi.con ...

  6. BaseCommand

    import java.io.Serializable; import android.util.Log; public class BaseCommand implements Serializab ...

  7. HDU - 6166:Senior Pan(顶点集合最短路&二进制分组)

    Senior Pan fails in his discrete math exam again. So he asks Master ZKC to give him graph theory pro ...

  8. 剑指Offer面试题:12.链表的倒数第K个结点

    一 题目:链表的倒数第K个结点 题目:输入一个链表,输出该链表中倒数第k个结点.为了符合大多数人的习惯,本题从1开始计数,即链表的尾结点是倒数第1个结点.例如一个链表有6个结点,从头结点开始它们的值依 ...

  9. Jetty服务怎么配置,如何发布项目

    Jetty相对于Tomcat来时相对较轻,适合多并发且有较多实时通讯的系统,能够稳定的保持连接且占用资源相对较少.今天就简单介绍一下Jetty的配置及项目部署. 工具/原料 Jetty 电脑 Jett ...

  10. 51nod 1011 最大公约数GCD

    输入2个正整数A,B,求A与B的最大公约数. 收起   输入 2个数A,B,中间用空格隔开.(1<= A,B <= 10^9) 输出 输出A与B的最大公约数. 输入样例 30 105 输出 ...