为什么使用apt-get安装Samba时会出现initscript错误?

我试图解决这个问题…

  • 为什么桑巴服务器无法启动PANIC错误?

…通过重新安装Samba,但我收到以下错误:

# apt-get install samba Reading package lists... Done Building dependency tree Reading state information... Done The following packages were automatically installed and are no longer required: libdns45 libisccc40 liblwres40 libbind9-40 libisccfg40 libisc45 Use 'apt-get autoremove' to remove them. Suggested packages: openbsd-inetd inet-superserver smbldap-tools ldb-tools The following NEW packages will be installed samba 0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded. Need to get 0B/4780kB of archives. After this operation, 12.7MB of additional disk space will be used. Preconfiguring packages ... Selecting previously deselected package samba. (Reading database ... 56732 files and directories currently installed.) Unpacking samba (from .../samba_2%3a3.2.5-4lenny13_amd64.deb) ... Processing triggers for man-db ... Setting up samba (2:3.2.5-4lenny13) ... Generating /etc/default/samba... Starting Samba daemons: nmbd failed! invoke-rc.d: initscript samba, action "start" failed. dpkg: error processing samba (--configure): subprocess installed post-installation script returned error exit status 1 Errors were encountered while processing: samba E: Sub-process /usr/bin/dpkg returned an error code (1) 

以前我运行过这些命令:

 apt-get remove --purge samba rm -fr /etc/samba/ rm -fr /var/log/samba/* 

  • 或者你仍然有一个正在运行的nmbd或者一个stream氓pidfile,在这种情况下杀死nmbd进程,删除pidfile,然后运行dpkg --configure nmbd ;

  • 或者在重新安装之前看到相同的错误,这不是由于samba本身,而是依赖(如libwbclient0libtalloc2libc6或内核或硬件)。 运行nmbd -i是否也会产生堆栈跟踪? 你最近升级了一个依赖关系吗? 你最近做过记忆testing吗?

我有同样的问题,只有我以前手动禁用smbd和nmbd,但不记得我是如何做到的。

检查是否可以启动smbd和nmbd: /etc/init.d/_mbd start ,然后testing两者是否仍在运行/etc/init.d/_mbd status 。 如果它们还没有运行,请确保两者的init conf文件仍然存在: /etc/init/_mbd.conf

嗯,以及这些命令好像让安装工作(但没有解决我原来的问题):

 apt-get remove --purge samba samba-common apt-get install samba