dpkg:警告:删除目录时/usr/local 不为空,因此未删除 [英] dpkg: warning: while removing directory /usr/local not empty so not removed
问题描述
我从以下文件夹结构构建并安装了一个 debian 包:
I built and installed a debian package from the following folder structure:
- myprog
- 德比安
- 控制
- 本地
- 斌
- myprog.sh
...使用以下命令:
dpkg -b myprog/myprog.deb &&dpkg -i myprog.deb
dpkg -b myprog/ myprog.deb && dpkg -i myprog.deb
当我现在通过键入以下内容删除包时:
When i now remove the package by typing:
dpkg -r myprog
dpkg -r myprog
.. 我收到以下警告:
.. I got the following warning:
dpkg:警告:删除 myprog 时,目录 '/usr/local' 不为空,因此未删除.
dpkg: warning: while removing myprog, directory '/usr/local' not empty so not removed.
我认为这是每天都会发生的情况,我该如何避免警告?
As I think this is an every day scenario, how can I avoid the warning?
向托尔斯滕问好!
我尝试将文件安装到/bin 而不是/usr/local/bin 并且在删除它时没有收到警告.似乎是这样,/usr/local/.. 文件夹不会被 dpkg 视为系统文件夹 (?).
I tried to install the file to /bin instead of /usr/local/bin and got no warning when removing it. Seems so, that the /usr/local/.. folder will not treated as a system folder (?) by dpkg.
推荐答案
没错 -- 包不应该接触
/usr/local
目录,文件系统层次结构标准为系统管理员保留,是他们的职责范围.That's right -- packages should never touch
/usr/local
directory, it's reserved for system administrators by Filesystem Hierarchy Standard and is their zone of responsibility.这篇关于dpkg:警告:删除目录时/usr/local 不为空,因此未删除的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
- 斌
- 德比安