Ubuntu下重新安装软件 配置文件不重新生成得问题解决
2016-12-05 16:15
671 查看
今天在Ubuntu中实验时,突然Samba服务器失灵了,决定卸载重新安装,使用apt-get remove 命令之后,发现原来的配置文件/etc/samba/smb.conf和其他的一些Samba相关的文件夹都存在,决定手工删除(怀疑是配置文件出了问题),
然而在删除了Samba相关的文件夹和文件之后,使用apt-get install 重新安装Samba时突然发现根本不会重新生成配置文件,这些蒙圈了。。。。。
百度了好久,在群里面问 也没找到答案
仔细查看重新安装时的提示信息,发现有一句
Not replacing deleted config file /etc/samba/smb.conf
如图
这个是突破口了,
查找到如下资料
If you installed phpmyadmin in your Debian and you receive this kind of errors:
Not replacing deleted config file /etc/phpmyadmin/apache.conf
Not replacing deleted config file /etc/phpmyadmin/config.footer.inc.php
Not replacing deleted config file /etc/phpmyadmin/config.header.inc.php
Not replacing deleted config file /etc/phpmyadmin/config.inc.php
Not replacing deleted config file /etc/phpmyadmin/htaccess
Not replacing deleted config file /etc/phpmyadmin/apache.conf
Not replacing deleted config file /etc/phpmyadmin/config.footer.inc.php
Not replacing deleted config file /etc/phpmyadmin/config.header.inc.php
Not replacing deleted config file /etc/phpmyadmin/config.inc.php
Not replacing deleted config file /etc/phpmyadmin/htaccess
Do as follow:
apt-get remove phpmyadmin
dpkg -P phpmyadmin
apt-get install phpmyadmin
And you will see this text as output:
Creating config file /etc/phpmyadmin/apache.conf with new version
Creating config file /etc/phpmyadmin/config.footer.inc.php with new version
Creating config file /etc/phpmyadmin/config.header.inc.php with new version
Creating config file /etc/phpmyadmin/config.inc.php with new version
Creating config file /etc/phpmyadmin/htaccess with new version
于是
按照 先 remove 然后 dpkg -P 再重新install的顺序 成功搞定
生成了新的smb.conf
linux@linux-virtual-machine:/etc$ sudo dpkg -P samba-client
dpkg:警告:ignoring request to remove samba-client which isn't installed
linux@linux-virtual-machine:/etc$ sudo apt-get install samba-common samba
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
apturl apturl-common libntdb1 python-ntdb
Use 'apt-get autoremove' to remove them.
将会安装下列额外的软件包:
samba-common-bin
建议安装的软件包:
bind9 bind9utils ldb-tools ntp smbldap-tools winbind heimdal-clients
下列【新】软件包将被安装:
samba samba-common samba-common-bin
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 542 个软件包未被升级。
需要下载 0 B/1,503 kB 的软件包。
解压缩后会消耗掉 13.5 MB 的额外空间。
您希望继续执行吗? [Y/n] y
正在预设定软件包 ...
Selecting previously unselected package samba-common.
(正在读取数据库 ... 系统当前共安装有 172908 个文件和目录。)
Preparing to unpack .../samba-common_2%3a4.3.11+dfsg-0ubuntu0.14.04.3_all.deb ...
Unpacking samba-common (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../samba-common-bin_2%3a4.3.11+dfsg-0ubuntu0.14.04.3_i386.deb ...
Unpacking samba-common-bin (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
Selecting previously unselected package samba.
Preparing to unpack .../samba_2%3a4.3.11+dfsg-0ubuntu0.14.04.3_i386.deb ...
Unpacking samba (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
正在设置 samba-common (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
Creating config file /etc/samba/smb.conf with new version
正在设置 samba-common-bin (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
正在设置 samba (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
smbd start/running, process 11833
nmbd start/running, process 11873
samba-ad-dc start/running, process 11912
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Processing triggers for libc-bin (2.19-0ubuntu6.5) ...
linux@linux-virtual-machine:/etc$ ls /etc/samba/
gdbcommands smb.conf tls
linux@linux-virtual-machine:/etc$
然而在删除了Samba相关的文件夹和文件之后,使用apt-get install 重新安装Samba时突然发现根本不会重新生成配置文件,这些蒙圈了。。。。。
百度了好久,在群里面问 也没找到答案
仔细查看重新安装时的提示信息,发现有一句
Not replacing deleted config file /etc/samba/smb.conf
如图
这个是突破口了,
查找到如下资料
If you installed phpmyadmin in your Debian and you receive this kind of errors:
Not replacing deleted config file /etc/phpmyadmin/apache.conf
Not replacing deleted config file /etc/phpmyadmin/config.footer.inc.php
Not replacing deleted config file /etc/phpmyadmin/config.header.inc.php
Not replacing deleted config file /etc/phpmyadmin/config.inc.php
Not replacing deleted config file /etc/phpmyadmin/htaccess
Not replacing deleted config file /etc/phpmyadmin/apache.conf
Not replacing deleted config file /etc/phpmyadmin/config.footer.inc.php
Not replacing deleted config file /etc/phpmyadmin/config.header.inc.php
Not replacing deleted config file /etc/phpmyadmin/config.inc.php
Not replacing deleted config file /etc/phpmyadmin/htaccess
Do as follow:
apt-get remove phpmyadmin
dpkg -P phpmyadmin
apt-get install phpmyadmin
And you will see this text as output:
Creating config file /etc/phpmyadmin/apache.conf with new version
Creating config file /etc/phpmyadmin/config.footer.inc.php with new version
Creating config file /etc/phpmyadmin/config.header.inc.php with new version
Creating config file /etc/phpmyadmin/config.inc.php with new version
Creating config file /etc/phpmyadmin/htaccess with new version
于是
按照 先 remove 然后 dpkg -P 再重新install的顺序 成功搞定
生成了新的smb.conf
linux@linux-virtual-machine:/etc$ sudo dpkg -P samba-client
dpkg:警告:ignoring request to remove samba-client which isn't installed
linux@linux-virtual-machine:/etc$ sudo apt-get install samba-common samba
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
下列软件包是自动安装的并且现在不需要了:
apturl apturl-common libntdb1 python-ntdb
Use 'apt-get autoremove' to remove them.
将会安装下列额外的软件包:
samba-common-bin
建议安装的软件包:
bind9 bind9utils ldb-tools ntp smbldap-tools winbind heimdal-clients
下列【新】软件包将被安装:
samba samba-common samba-common-bin
升级了 0 个软件包,新安装了 3 个软件包,要卸载 0 个软件包,有 542 个软件包未被升级。
需要下载 0 B/1,503 kB 的软件包。
解压缩后会消耗掉 13.5 MB 的额外空间。
您希望继续执行吗? [Y/n] y
正在预设定软件包 ...
Selecting previously unselected package samba-common.
(正在读取数据库 ... 系统当前共安装有 172908 个文件和目录。)
Preparing to unpack .../samba-common_2%3a4.3.11+dfsg-0ubuntu0.14.04.3_all.deb ...
Unpacking samba-common (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
Selecting previously unselected package samba-common-bin.
Preparing to unpack .../samba-common-bin_2%3a4.3.11+dfsg-0ubuntu0.14.04.3_i386.deb ...
Unpacking samba-common-bin (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
Selecting previously unselected package samba.
Preparing to unpack .../samba_2%3a4.3.11+dfsg-0ubuntu0.14.04.3_i386.deb ...
Unpacking samba (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
Processing triggers for man-db (2.6.7.1-1ubuntu1) ...
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
正在设置 samba-common (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
Creating config file /etc/samba/smb.conf with new version
正在设置 samba-common-bin (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
正在设置 samba (2:4.3.11+dfsg-0ubuntu0.14.04.3) ...
smbd start/running, process 11833
nmbd start/running, process 11873
samba-ad-dc start/running, process 11912
Processing triggers for ureadahead (0.100.0-16) ...
Processing triggers for ufw (0.34~rc-0ubuntu2) ...
Processing triggers for libc-bin (2.19-0ubuntu6.5) ...
linux@linux-virtual-machine:/etc$ ls /etc/samba/
gdbcommands smb.conf tls
linux@linux-virtual-machine:/etc$
相关文章推荐
- ubuntu opera问题解决--E: 软件包 opera 需要重新安装,但是我无法找到相应的安装文件。
- Ubuntu “软件包 libpython3.5-dev 需要重新安装,但是我无法找到相应的安装文件”的问题
- Ubuntu16.04安装deb软件包错误(依赖关系问题-仍未被配置)解决
- r cannot be resolved to a variable 问题解决 / r.java文件没有自动生成 分类: Android安装及配置 2014-06-22 18:03 141人阅读 评论(0) 收藏
- 在ubuntu下安装任何软件时都提示软件包 flash-plugin 需要重新安装,但是我无法找到相应的安装文件的错误的解决办法。
- 解决MFC打包软件安装在win8 win10 C盘无法更改配置文件的问题
- 解决“由于应用程序的配置不正确,应用程序未能启动,重新安装应用程序可能会纠正这个问题”
- Ubuntu7.04使用totem-xine,安装libxine1-ffmpeg后,rm文件播放无声问题的解决办法
- VS.net2005写的程序如何在没有.Net FrameWork的机器上运行 --解决“由于应用程序的配置不正确,应用程序未能启动,重新安装应用程序可能会纠正这个问题”(转载)
- Ubuntu7.04使用totem-xine,安装libxine1-ffmpeg后,rm文件播放无声问题的解决办法
- 解决“由于应用程序的配置不正确,应用程序未能启动,重新安装应用程序可能会纠正这个问题”
- 解决“由于应用程序的配置不正确,应用程序未能启动,重新安装应用程序可能会纠正这个问题”
- 安装配置管理 之 Fedora 6.0 蓝牙bluebooth传送文件的问题解决方法
- [VS2005]解决“由于应用程序的配置不正确,应用程序未能启动,重新安装应用程序可能会纠正这个问题”
- Ubuntu无网环境mysql安装配置问题解决
- 解决ubuntu下安装bin文件的问题libstdc++.so.5
- 解决“由于应用程序配置不正确,应用程序未能启动。重新安装应用程序可能会纠正这个问题”
- Ubuntu7.04使用totem-xine,安装libxine1-ffmpeg后,rm文件播放无声问题的解决办法
- Ubuntu7.04使用totem-xine,安装libxine1-ffmpeg后,rm文件播放无声问题的解决办法
- Ubuntu7.04使用totem-xine,安装libxine1-ffmpeg后,rm文件播放无声问题的解决办法