大网数据广告活动
服务器运维问答

bash: dpkg-reconfigure: command not found

· 52CE 我爱测

Debian10 seems to have removed the commands poweroff , reboot and dpkg-reconfigure , probably among others. What do I do instead of dpkg-reconfigure locales ? As a side note, I read the release notes and I think it's ridiculous t…

问题原文

原帖链接 · gl00ten · CC BY-SA 4.0

Debian10 seems to have removed the commands poweroff, reboot and dpkg-reconfigure, probably among others. What do I do instead of dpkg-reconfigure locales?

As a side note, I read the release notes and I think it's ridiculous this stuff isn't screamed at you when you read them.

# dpkg-reconfigure
bash: dpkg-reconfigure: command not found

edit: I am already aware I can get the dpkg-configure bin by installing a package: debconf. This package was not installed by default. This normally indicates deprecation.

社区高分解答

原帖链接 · Lenniey · CC BY-SA 4.0

This is the behaviour if you switched to root using su instead of su -, for example. In Debian 10 dpkg-reconfigure is located in /usr/sbin/, so it has to be in the PATH.

Compare these two PATH-variables:

user1@d10test:~$ su root
Password: 
root@d10test:/home/user1/# echo $PATH
/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
root@d10test:/home/user1/# exit

user1@d10test:~$ su - root
Password: 
root@d10test:/home/user1/# echo $PATH
/usr/local/sbin:/usr/local/bin:/sbin:/usr/bin:/bin

There you'll see that the environment set bei su does not include sbin in the PATH, so dpkg-reconfigure won't be found.

debconf should be installed by default, though.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2019-07-23)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。