Dom*_*lcs 4 samba software-installation
我对损坏的 samba 配置文件很生气。我刚刚删除了/etc/samba文件夹。现在我想重新安装 samba,但我不能。
这就是我所做的:
sudo apt-get install samba
sudo vim /etc/samba/... # broke something in the config
sudo apt-get remove --purge samba
# realized that the config file in the `/etc/samba` is still there.
sudo rm -r /etc/samba
sudo apt-get install samba # getting error
Run Code Online (Sandbox Code Playgroud)
我想删除 samba (完全删除)然后像以前什么都没发生过一样安装它?
这该怎么做?
[编辑]
dpkg: error processing package samba (--configure):
subprocess installed post-installation script returned error exit status 1
Processing triggers for systemd (215-17+deb8u4) ...
Errors were encountered while processing:
samba
E: Sub-process /usr/bin/dpkg returned an error code (1)
Run Code Online (Sandbox Code Playgroud)
和
大多数情况下,除了单独的 samba 包之外,您的安装还安装了更多的依赖包。那么为什么您的下一次安装不需要之前下载的文件大小。因此,如果您需要像您要求的那样完全删除它,那么您需要卸载它并删除不需要的依赖项。
sudo apt-get remove --purge samba samba-*
sudo apt-get autoremove
Run Code Online (Sandbox Code Playgroud)
之后,如果您在 /etc/samba 中找到配置文件,最好将其重命名。
sudo mv /etc/samba /etc/samba.old
Run Code Online (Sandbox Code Playgroud)
现在您可以通过发出命令来安装 samba
sudo apt-get install samba
Run Code Online (Sandbox Code Playgroud)
就是这样。