Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is m...
Tofloor
poster avatar
errormaker
deepin
2017-09-24 18:05
Author
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.

theprimone@via:~$ sudo apt-get -f install
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
正在设置 samba (2:4.6.5+dfsg-8deepin) ...
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Job for nmbd.service failed because a timeout was exceeded.
See "systemctl  status nmbd.service" and "journalctl  -xe" for details.
invoke-rc.d: initscript nmbd, action "restart" failed.
● nmbd.service - Samba NMB Daemon
   Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Sun 2017-09-24 10:01:17 CST; 10ms ago
     Docs: man:nmbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 3792 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=killed, signal=TERM)
Main PID: 3792 (code=killed, signal=TERM)
   Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting for interface ..."

9月 24 10:01:07 via systemd[1]: Starting Samba NMB Daemon...
9月 24 10:01:17 via systemd[1]: nmbd.service: Start operation timed out. Terminating.
9月 24 10:01:17 via systemd[1]: Failed to start Samba NMB Daemon.
9月 24 10:01:17 via systemd[1]: nmbd.service: Unit entered failed state.
9月 24 10:01:17 via systemd[1]: nmbd.service: Failed with result 'timeout'.
dpkg: 处理软件包 samba (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在处理用于 libc-bin (2.24-9) 的触发器 ...
在处理时有错误发生:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)


尝试按照16年的一个帖子试一下 还是没用啊 没其他人报这个问题?
Reply Favorite View the author
All Replies
avatar
errormaker
deepin
2017-09-24 20:01
#1
有可爱的人吗?现在啥都装不了 很烦
Reply View the author
avatar
errormaker
deepin
2017-09-25 06:25
#2
额 难道就我一个人这样?
Reply View the author
avatar
qiujieqiong
deepin
2017-09-25 18:57
#3
这种错误一般是安装某个软件时按了CTRL+C终止了,导致环境变量异常,可能已经安装了,但是系统信息并没有更新
dpkg -s samba
看看软件的安装状态,如果没有正确安装,就sudo rm /var/lib/dpkg/info/samba.* ,再重新安装
Reply View the author
avatar
errormaker
deepin
2017-09-26 03:09
#4
https://bbs.deepin.org/post/145948
这种错误一般是安装某个软件时按了CTRL+C终止了,导致环境变量异常,可能已经安装了,但是系统信息并没有更 ...

Package: samba
Status: install ok half-configured
Priority: optional
Section: net
Installed-Size: 10943
Maintainer: Debian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
Architecture: amd64
Version: 2:4.6.5+dfsg-8deepin
Config-Version: 2:4.5.8+dfsg-2
Depends: adduser, libpam-modules, libpam-runtime (>= 1.0.1-11), lsb-base (>= 4.1+Debian), procps, python (<< 2.8), python-dnspython, python-samba, samba-common (= 2:4.6.5+dfsg-8deepin), samba-common-bin (= 2:4.6.5+dfsg-8deepin), tdb-tools, init-system-helpers (>= 1.18~), python (>= 2.7~), python2.7:any, python:any (<< 2.8), python:any (>= 2.7~), libattr1 (>= 1:2.4.46-8), libbsd0 (>= 0.0), libc6 (>= 2.14), libldb1 (>= 0.9.21), libpopt0 (>= 1.14), libpython2.7 (>= 2.7), libtalloc2 (>= 2.0.4~git20101213), libtdb1 (>= 1.2.7+git20101214), libtevent0 (>= 0.9.16), libwbclient0 (= 2:4.6.5+dfsg-8deepin), samba-libs (= 2:4.6.5+dfsg-8deepin)
Pre-Depends: dpkg (>= 1.15.6~)
Recommends: attr, logrotate, samba-dsdb-modules, samba-vfs-modules
Suggests: bind9 (>= 1:9.5.1), bind9utils, ctdb, ldb-tools, ntp | chrony (>= 3.0-1), smbldap-tools, ufw, winbind
Enhances: bind9, ntp
Conffiles:
/etc/cron.daily/samba f6519535df7964f95cdd7db501bf3ad2
/etc/init.d/nmbd c5945c7ddd7c64e44095c0702eb13095
/etc/init.d/samba-ad-dc 53f4dbe1f4fefabb82f98ab56c2753ef
/etc/init.d/smbd 5218124fdeda5bf0035704c9c97104e6
/etc/logrotate.d/samba 1b8ae93dc6bc1a6cc6b782b7972b03af
/etc/ufw/applications.d/samba 9d474788f9a1955e16134f2794be473d
Description: SMB/CIFS file, print, and login server for Unix
Samba is an implementation of the SMB/CIFS protocol for Unix systems,
providing support for cross-platform file and printer sharing with
Microsoft Windows, OS X, and other Unix systems.  Samba can also function
as an NT4-style domain controller, and can integrate with both NT4 domains
and Active Directory realms as a member server.
.
This package provides the components necessary to use Samba as a stand-alone
file and print server or as an NT4 or Active Directory domain controller.
For use in an NT4 domain or Active Directory realm, you will also need the
winbind package.
.
This package is not required for connecting to existing SMB/CIFS servers
(see smbclient) or for mounting remote filesystems (see cifs-utils).
Homepage: http://www.samba.org

这算正确安装吗?
Reply View the author
avatar
qiujieqiong
deepin
2017-09-26 18:58
#5
你看 Status: install ok half-configured
如果是正确安装,应该是这样的:
dpkg -s samba
Package: samba
Status: install ok installed
Priority: optional
Section: net
Installed-Size: 10943
Maintainer: Debian Samba Maintainers <pkg-samba-maint@lists.alioth.debian.org>
Architecture: amd64
Version: 2:4.6.5+dfsg-8deepin
Depends: adduser, libpam-modules, libpam-runtime (>= 1.0.1-11), lsb-base (>= 4.1+Debian), procps, python (<< 2.8), python-dnspython, python-samba, samba-common (= 2:4.6.5+dfsg-8deepin), samba-common-bin (= 2:4.6.5+dfsg-8deepin), tdb-tools, init-system-helpers (>= 1.18~), python (>= 2.7~), python2.7:any, python:any (<< 2.8), python:any (>= 2.7~), libattr1 (>= 1:2.4.46-8), libbsd0 (>= 0.0), libc6 (>= 2.14), libldb1 (>= 0.9.21), libpopt0 (>= 1.14), libpython2.7 (>= 2.7), libtalloc2 (>= 2.0.4~git20101213), libtdb1 (>= 1.2.7+git20101214), libtevent0 (>= 0.9.16), libwbclient0 (= 2:4.6.5+dfsg-8deepin), samba-libs (= 2:4.6.5+dfsg-8deepin)
Pre-Depends: dpkg (>= 1.15.6~)
Recommends: attr, logrotate, samba-dsdb-modules, samba-vfs-modules
Suggests: bind9 (>= 1:9.5.1), bind9utils, ctdb, ldb-tools, ntp | chrony (>= 3.0-1), smbldap-tools, ufw, winbind
Enhances: bind9, ntp
Conffiles:
/etc/cron.daily/samba f6519535df7964f95cdd7db501bf3ad2
/etc/init.d/nmbd c5945c7ddd7c64e44095c0702eb13095
/etc/init.d/samba-ad-dc 53f4dbe1f4fefabb82f98ab56c2753ef
/etc/init.d/smbd 5218124fdeda5bf0035704c9c97104e6
/etc/logrotate.d/samba 1b8ae93dc6bc1a6cc6b782b7972b03af
/etc/ufw/applications.d/samba 9d474788f9a1955e16134f2794be473d
Description: SMB/CIFS file, print, and login server for Unix
Samba is an implementation of the SMB/CIFS protocol for Unix systems,
providing support for cross-platform file and printer sharing with
Microsoft Windows, OS X, and other Unix systems.  Samba can also function
as an NT4-style domain controller, and can integrate with both NT4 domains
and Active Directory realms as a member server.
.
This package provides the components necessary to use Samba as a stand-alone
file and print server or as an NT4 or Active Directory domain controller.
For use in an NT4 domain or Active Directory realm, you will also need the
winbind package.
.
This package is not required for connecting to existing SMB/CIFS servers
(see smbclient) or for mounting remote filesystems (see cifs-utils).
Homepage: http://www.samba.org
Reply View the author
avatar
jingle
deepin
2017-09-26 23:13
#6
sudo dpkg --configure -a 可以吗
Reply View the author
avatar
errormaker
deepin
2017-09-27 17:47
#7
https://bbs.deepin.org/post/145948
你看 Status: install ok half-configured
如果是正确安装,应该是这样的:
dpkg -s samba

今天我重装了系统 也这样
Reply View the author
avatar
errormaker
deepin
2017-09-27 17:48
#8
https://bbs.deepin.org/post/145948
sudo dpkg --configure -a 可以吗

theprimone@via:~$ sudo dpkg --configure -a
正在设置 samba (2:4.6.5+dfsg-8deepin) ...
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Job for nmbd.service failed because a timeout was exceeded.
See "systemctl  status nmbd.service" and "journalctl  -xe" for details.
invoke-rc.d: initscript nmbd, action "restart" failed.
● nmbd.service - Samba NMB Daemon
   Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Wed 2017-09-27 09:48:00 CST; 14ms ago
     Docs: man:nmbd(8)
           man:samba(7)
           man:smb.conf(5)
Main PID: 24956
   Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting for interface ..."
    Tasks: 1 (limit: 4915)
   CGroup: /system.slice/nmbd.service

9月 27 09:47:49 via systemd[1]: Starting Samba NMB Daemon...
9月 27 09:47:49 via systemd[1]: nmbd.service: Supervising process 24956 which is not our child. We'll most lik…t exits.
9月 27 09:48:00 via systemd[1]: nmbd.service: Start operation timed out. Terminating.
9月 27 09:48:00 via systemd[1]: nmbd.service: Killing process 24956 (nmbd) with signal SIGKILL.
9月 27 09:48:00 via systemd[1]: nmbd.service: Killing process 24956 (nmbd) with signal SIGKILL.
9月 27 09:48:00 via systemd[1]: Failed to start Samba NMB Daemon.
9月 27 09:48:00 via systemd[1]: nmbd.service: Unit entered failed state.
9月 27 09:48:00 via systemd[1]: nmbd.service: Failed with result 'timeout'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: 处理软件包 samba (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在处理用于 libc-bin (2.24-9) 的触发器 ...
在处理时有错误发生:
samba

无奈
Reply View the author
avatar
qiujieqiong
deepin
2017-09-27 18:13
#9
sudo systemctl mask samba-ad-dc.service
sudo apt-get install -f
Reply View the author
avatar
errormaker
deepin
2017-09-27 18:47
#10
https://bbs.deepin.org/post/145948
sudo systemctl mask samba-ad-dc.service
sudo apt-get install -f

theprimone@via:/$ sudo systemctl mask samba-ad-dc.service
theprimone@via:/$ sudo apt-get install -f
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
下列软件包是自动安装的并且现在不需要了:
  libfile-copy-recursive-perl update-inetd
使用'sudo apt autoremove'来卸载它(它们)。
升级了 0 个软件包,新安装了 0 个软件包,要卸载 0 个软件包,有 0 个软件包未被升级。
有 1 个软件包没有被完全安装或卸载。
解压缩后会消耗 0 B 的额外空间。
正在设置 samba (2:4.6.5+dfsg-8deepin) ...
Failed to preset unit: Unit file /etc/systemd/system/samba-ad-dc.service is masked.
/usr/bin/deb-systemd-helper: error: systemctl preset failed on samba-ad-dc.service: No such file or directory
Job for nmbd.service failed because a timeout was exceeded.
See "systemctl  status nmbd.service" and "journalctl  -xe" for details.
invoke-rc.d: initscript nmbd, action "restart" failed.
● nmbd.service - Samba NMB Daemon
   Loaded: loaded (/lib/systemd/system/nmbd.service; enabled; vendor preset: enabled)
   Active: failed (Result: timeout) since Wed 2017-09-27 10:45:11 CST; 10ms ago
     Docs: man:nmbd(8)
           man:samba(7)
           man:smb.conf(5)
  Process: 29199 ExecStart=/usr/sbin/nmbd $NMBDOPTIONS (code=killed, signal=TERM)
Main PID: 29199 (code=killed, signal=TERM)
   Status: "nmbd: No local IPv4 non-loopback interfaces available, waiting for interface ..."

9月 27 10:45:01 via systemd[1]: Starting Samba NMB Daemon...
9月 27 10:45:11 via systemd[1]: nmbd.service: Start operation timed out. Terminating.
9月 27 10:45:11 via systemd[1]: Failed to start Samba NMB Daemon.
9月 27 10:45:11 via systemd[1]: nmbd.service: Unit entered failed state.
9月 27 10:45:11 via systemd[1]: nmbd.service: Failed with result 'timeout'.
dpkg: 处理软件包 samba (--configure)时出错:
子进程 已安装 post-installation 脚本 返回错误状态 1
正在处理用于 libc-bin (2.24-9) 的触发器 ...
在处理时有错误发生:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)

2333
我也很绝望啊 我刚装的新系统 而且这个问题还会导致安装不了软件 真的烦
应用商店里的会提示安装失败 但是实际安装成功了
Reply View the author
avatar
errormaker
deepin
2017-09-27 18:53
#11
百度谷歌白天 毫无收获
Reply View the author
avatar
errormaker
deepin
2017-09-27 18:54
#12
而且 我这是前两天刚下的官方镜像做的系统啊 为什么连安装软件都要报这种错 好无语
Reply View the author
avatar
qiujieqiong
deepin
2017-09-27 19:10
#13
ip a
1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever

看下lo 的状态是不是LOOPBACK,UP,LOWER_UP
Reply View the author
avatar
errormaker
deepin
2017-09-27 19:18
#14
https://bbs.deepin.org/post/145948
ip a
1: lo:  mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:0 ...

1: lo: mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: enp0s31f6: mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 88:88:88:88:87:88 brd ff:ff:ff:ff:ff:ff
7: ppp0: <OINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1492 qdisc pfifo_fast state UNKNOWN group default qlen 3
    link/ppp
    inet 10.2.135.193 peer 10.2.128.1/32 scope global ppp0
       valid_lft forever preferred_lft forever
    inet6 2001:250:7404:2004:8045:a454:d85b:a6ee/64 scope global mngtmpaddr dynamic
       valid_lft 254640sec preferred_lft 168240sec
    inet6 fe80::8045:a454:d85b:a6ee/10 scope link
       valid_lft forever preferred_lft forever

对的
Reply View the author
avatar
qiujieqiong
deepin
2017-09-27 19:24
#15
你用了pppoe拨号啊,用网线直连试试
Reply View the author
avatar
errormaker
deepin
2017-09-28 00:28
#16
https://bbs.deepin.org/post/145948
你用了pppoe拨号啊,用网线直连试试

校园网都是这样啊 台式也没无线的功能啊 我看过另一个帖子说也是直连
但是以前的版本都没这个问题啊 这新版的是咋地了
Reply View the author
avatar
errormaker
deepin
2017-09-28 02:02
#17
真的烦 受不了 看来要换个发行版了
Reply View the author
avatar
呆了个呆
deepin
2017-10-16 07:14
#18
https://bbs.deepin.org/post/145948
额 难道就我一个人这样?

我也是这样问题,今天安装更新,现在卡在这里了
Reply View the author