13

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.

gxx
  • 5,199
gl00ten
  • 317
  • 1
  • 2
  • 9

5 Answers5

18

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.

Lenniey
  • 5,438
7

From the wiki

https://wiki.debian.org/NewInBuster

Apparently I didn't read the other release notes

Changes The su command in buster is provided by the util-linux source package, instead of the shadow source package, and no longer alters the PATH variable by default. This means that after doing su, your PATH may not contain directories like /sbin, and many system administration commands will fail. There are several workarounds:

Use su - instead; this launches a login shell, which forces PATH to be changed, but also changes everything else including the working directory.

Use sudo instead. sudo still runs commands with an altered PATH variable.

Put ALWAYS_SET_PATH yes in /etc/login.defs to get an approximation of the old behavior.

Put the system administration directories (/sbin, /usr/sbin, /usr/local/sbin) in your regular account's PATH (see EnvironmentVariables for help with this).

thanks to my friend falso for making me use google more carefully

gl00ten
  • 317
  • 1
  • 2
  • 9
5

You can try

sudo dpkg-reconfigure locales

Instead of

dpkg-reconfigure locales

It works for me

arnolem
  • 159
1

Debian 10 has not removed dpkg-reconfigure at all. It is present and part of the debconf package, which should have already been installed on your system. If it is missing from your system, then you need to install (or reinstall) the debconf package.

Michael Hampton
  • 252,907
1

Log as root using:

su - root

Instead of:

su
calbasi
  • 31