我的服务器上新安装了 Ubuntu 16.04,希望使用 LibreELEC 向 Wetek Core 提供文件。
我在文件共享方面遇到了问题,于是做出了一个糟糕的决定:卸载 Samba 并重新安装。我通过尝试共享文件来安装它,它询问我是否要安装 Samba。安装失败后,它给了我以下错误:
installArchives() failed: Selecting previously unselected package python-dnspython.
(Reading database ...
(Reading database ... 5%%
(Reading database ... 10%%
(Reading database ... 15%%
(Reading database ... 20%%
(Reading database ... 25%%
(Reading database ... 30%%
(Reading database ... 35%%
(Reading database ... 40%%
(Reading database ... 45%%
(Reading database ... 50%%
(Reading database ... 55%%
(Reading database ... 60%%
(Reading database ... 65%%
(Reading database ... 70%%
(Reading database ... 75%%
(Reading database ... 80%%
(Reading database ... 85%%
(Reading database ... 90%%
(Reading database ... 95%%
(Reading database ... 100%%
(Reading database ... 248054 files and directories currently installed.)
Preparing to unpack .../python-dnspython_1.12.0-1_all.deb ...
Unpacking python-dnspython (1.12.0-1) ...
Selecting previously unselected package python-crypto.
Preparing to unpack .../python-crypto_2.6.1-6ubuntu0.16.04.2_amd64.deb ...
Unpacking python-crypto (2.6.1-6ubuntu0.16.04.2) ...
Selecting previously unselected package python-ldb.
Preparing to unpack .../python-ldb_2%%3a1.1.24-1ubuntu3_amd64.deb ...
Unpacking python-ldb (2:1.1.24-1ubuntu3) ...
Selecting previously unselected package python-tdb.
Preparing to unpack .../python-tdb_1.3.8-2_amd64.deb ...
Unpacking python-tdb (1.3.8-2) ...
Selecting previously unselected package python-samba.
Preparing to unpack .../python-samba_2%%3a4.3.11+dfsg-0ubuntu0.16.04.9_amd64.deb ...
Unpacking python-samba (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../samba-common-bin_2%%3a4.3.11+dfsg-0ubuntu0.16.04.9_amd64.deb ...
Unpacking samba-common-bin (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Selecting previously unselected package tdb-tools.
Preparing to unpack .../tdb-tools_1.3.8-2_amd64.deb ...
Unpacking tdb-tools (1.3.8-2) ...
Selecting previously unselected package samba.
Preparing to unpack .../samba_2%%3a4.3.11+dfsg-0ubuntu0.16.04.9_amd64.deb ...
Unpacking samba (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Selecting previously unselected package attr.
Preparing to unpack .../attr_1%%3a2.4.47-2_amd64.deb ...
Unpacking attr (1:2.4.47-2) ...
Selecting previously unselected package libaio1:amd64.
Preparing to unpack .../libaio1_0.3.110-2_amd64.deb ...
Unpacking libaio1:amd64 (0.3.110-2) ...
Selecting previously unselected package samba-dsdb-modules.
Preparing to unpack .../samba-dsdb-modules_2%%3a4.3.11+dfsg-0ubuntu0.16.04.9_amd64.deb ...
Unpacking samba-dsdb-modules (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Selecting previously unselected package samba-vfs-modules.
Preparing to unpack .../samba-vfs-modules_2%%3a4.3.11+dfsg-0ubuntu0.16.04.9_amd64.deb ...
Unpacking samba-vfs-modules (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Processing triggers for systemd (229-4ubuntu19) ...
Setting up python-dnspython (1.12.0-1) ...
Setting up python-crypto (2.6.1-6ubuntu0.16.04.2) ...
Setting up python-ldb (2:1.1.24-1ubuntu3) ...
Setting up python-tdb (1.3.8-2) ...
Setting up python-samba (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Setting up samba-common-bin (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Setting up tdb-tools (1.3.8-2) ...
update-alternatives: using /usr/bin/tdbbackup.tdbtools to provide /usr/bin/tdbbackup (tdbbackup) in auto mode
Setting up samba (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Job for smbd.service failed because the control process exited with error code. See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "start" failed.
smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2017-08-06 03:58:00 EDT; 5ms ago
Docs: man:systemd-sysv-generator(8)
Process: 13139 ExecStart=/etc/init.d/smbd start (code=exited, status=1/FAILURE)
Aug 06 03:58:00 capitalist systemd[1]: Starting LSB: start Samba SMB/CIFS d.....
Aug 06 03:58:00 capitalist smbd[13139]: * Starting SMB/CIFS daemon smbd
Aug 06 03:58:00 capitalist smbd[13139]: ...fail!
Aug 06 03:58:00 capitalist systemd[1]: smbd.service: Control process exited...=1
Aug 06 03:58:00 capitalist systemd[1]: Failed to start LSB: start Samba SMB...).
Aug 06 03:58:00 capitalist systemd[1]: smbd.service: Unit entered failed state.
Aug 06 03:58:00 capitalist systemd[1]: smbd.service: Failed with result 'ex...'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Setting up attr (1:2.4.47-2) ...
Setting up libaio1:amd64 (0.3.110-2) ...
Setting up samba-dsdb-modules (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Setting up samba-vfs-modules (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Errors were encountered while processing:
samba
Setting up samba (2:4.3.11+dfsg-0ubuntu0.16.04.9) ...
Job for smbd.service failed because the control process exited with error code. See "systemctl status smbd.service" and "journalctl -xe" for details.
invoke-rc.d: initscript smbd, action "start" failed.
smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2017-08-06 03:58:03 EDT; 4ms ago
Docs: man:systemd-sysv-generator(8)
Process: 13297 ExecStart=/etc/init.d/smbd start (code=exited, status=1/FAILURE)
Aug 06 03:58:03 capitalist systemd[1]: Starting LSB: start Samba SMB/CIFS d.....
Aug 06 03:58:03 capitalist smbd[13297]: * Starting SMB/CIFS daemon smbd
Aug 06 03:58:03 capitalist smbd[13297]: ...fail!
Aug 06 03:58:03 capitalist systemd[1]: smbd.service: Control process exited...=1
Aug 06 03:58:03 capitalist systemd[1]: Failed to start LSB: start Samba SMB...).
Aug 06 03:58:03 capitalist systemd[1]: smbd.service: Unit entered failed state.
Aug 06 03:58:03 capitalist systemd[1]: smbd.service: Failed with result 'ex...'.
Hint: Some lines were ellipsized, use -l to show in full.
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for libc-bin (2.23-0ubuntu9) ...
Package 'libpam-smbpass' is virtual.
Samba's testparm returned error 1: Load smb config files from /etc/samba/smb.conf
rlimit_max: increasing rlimit_max (1024) to minimum Windows limit (16384)
Error loading services.
$ systemctl status -l smbd.service
● smbd.service - LSB: start Samba SMB/CIFS daemon (smbd)
Loaded: loaded (/etc/init.d/smbd; bad; vendor preset: enabled)
Active: failed (Result: exit-code) since Sun 2017-08-06 03:58:03 EDT; 5h 34mi
Docs: man:systemd-sysv-generator(8)
Process: 13297 ExecStart=/etc/init.d/smbd start (code=exited, status=1/FAILURE
Aug 06 03:58:03 capitalist systemd[1]: Starting LSB: start Samba SMB/CIFS daemon
Aug 06 03:58:03 capitalist smbd[13297]: * Starting SMB/CIFS daemon smbd
Aug 06 03:58:03 capitalist smbd[13297]: ...fail!
Aug 06 03:58:03 capitalist systemd[1]: smbd.service: Control process exited, cod
Aug 06 03:58:03 capitalist systemd[1]: Failed to start LSB: start Samba SMB/CIFS
Aug 06 03:58:03 capitalist systemd[1]: smbd.service: Unit entered failed state.
Aug 06 03:58:03 capitalist systemd[1]: smbd.service: Failed with result 'exit-co
lines 1-13/13 (END)
$ find /etc/samba/smb.conf
find: ‘/etc/samba/smb.conf’: No such file or directory
brian@capitalist:~$ locate /etc/samba/smb.conf
brian@capitalist:~$ locate smb.conf
/usr/share/doc/nautilus-share/examples/smb.conf
/usr/share/doc/samba-common/examples/smb.conf.default.gz
/usr/share/man/man5/smb.conf.5.gz
/usr/share/samba/smb.conf
/var/lib/ucf/cache/:etc:samba:smb.conf
我不知道自己在做什么并且需要一些帮助。
答案1
我决定尝试完全删除然后重新安装。我卸载了它并删除了不需要的依赖项。
首先我使用了:
sudo apt-get remove --purge samba samba-*
sudo apt-get autoremove
我找不到 smb.conf 文件,所以我没有重命名它,但我读到,如果您在 /etc/samba 中找到配置文件,最好重命名它。
sudo mv /etc/samba /etc/samba.old
然后我通过发出命令安装了 samba。
sudo apt-get install samba
这让我又回到了原点。
我重新systemctl status -l smbd.service
smbd 服务正在运行,我能够在正确的位置找到 smb.conf:
/etc/samba/smb.conf
感谢 David Foerster!!