我试图让 samba 在我的机器上运行,但失败了。安装 samba 后,我总是收到错误消息,缺少一些库。
我的环境:
lsb_release -a
No LSB modules are available.
Distributor ID: Debian
Description: Debian GNU/Linux 9.5 (stretch)
Release: 9.5
Codename: stretch
Linux test 4.9.0-8-amd64 #1 SMP Debian 4.9.110-3+deb9u4 (2018-08-21) x86_64 GNU/Linux
● smbd.service - Samba SMB Daemon
Loaded: loaded (/lib/systemd/system/smbd.service; enabled; vendor preset: enabled)
Active: failed (Result: exit-code) since Mon 2018-09-10 09:07:55 CEST; 12ms ago
Docs: man:smbd(8)
man:samba(7)
man:smb.conf(5)
Process: 45717 ExecStart=/usr/sbin/smbd $SMBDOPTIONS (code=exited, status=127)
Main PID: 45717 (code=exited, status=127)
Sep 10 09:07:55 test systemd[1]: Starting Samba SMB Daemon...
Sep 10 09:07:55 test smbd[45717]: /usr/sbin/smbd: error while loading shared libraries: libwinbind-client.so.0: cannot open shared object file: No such fi… or directory
Sep 10 09:07:55 test systemd[1]: smbd.service: Main process exited, code=exited, status=127/n/a
Sep 10 09:07:55 test systemd[1]: Failed to start Samba SMB Daemon.
Sep 10 09:07:55 test systemd[1]: smbd.service: Unit entered failed state.
Sep 10 09:07:55 test systemd[1]: smbd.service: Failed with result 'exit-code'.
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.24-11+deb9u3) ...
Processing triggers for systemd (232-25+deb9u4) ...
Processing triggers for ufw (0.35-4) ...
Errors were encountered while processing:
我尝试解决这个问题:
apt-get autoremove --purge
apt-get autoclean
apt-get remove samba samba-common
apt-get autoclean
apt-get autoremove --purge
该lib似乎在libwbclient-dev包中,所以我安装了libwbclient-dev
libwbclient-dev is already the newest version (2:4.5.12+dfsg-2+deb9u3)
根本没有成功。
答案1
这看起来像是缺少某些依赖项时的安装。通常这是因为您忘记apt-get update
在 之前运行apt-get install...
,因此预期的包集不再符合实际情况。
使固定
apt-get update # Get the current set of packages
apt-get install # Complete the installation attempt