Samba

samba 安裝後無法啟動

  • September 10, 2018

我試圖讓 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)

根本沒有成功。

這看起來像是缺少某些依賴項時的安裝。通常是因為您忘記在apt-get update之前執行apt-get install...,因此預期的軟體包集不再符合實際情況。

使固定

apt-get update     # Get the current set of packages
apt-get install    # Complete the installation attempt

引用自:https://unix.stackexchange.com/questions/467973