5

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,483
  • 2
  • 21
  • 42
fullmooninu
  • 227
  • 1
  • 2
  • 8

5 Answers5

9

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,090
  • 2
  • 17
  • 28
6

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

fullmooninu
  • 227
  • 1
  • 2
  • 8
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
  • 237,123
  • 42
  • 477
  • 940
  • please read the edit – fullmooninu Jul 23 '19 at 05:56
  • @fullmooninu Exactly how did you do the installation? – Michael Hampton Jul 23 '19 at 06:00
  • @fullmooninu - As this answer says, `debconf` should be installed by default. `apt-cache show debconf | grep Priority` returns `Priority: required`. Packages with priority "required" are installed by default and cannot be removed without getting the warning "You are about to do something potentially harmful. To continue type in the phrase 'Yes, do as I say!'". In the specific case of `debconf`, removing it would also remove 511 other dependent packages. If `debconf` is not installed on your system, then you (or someone) have not only removed it, but jumped through a few hoops to do so. – Dave Sherohman Jul 23 '19 at 08:15
  • i just did a normal install, selected only ssh server and default applications and proceeded. It's a vm. – fullmooninu Jul 23 '19 at 13:20
0

Log as root using:

su - root

Instead of:

su
calbasi
  • 21
  • 2
0

You can try

sudo dpkg-reconfigure locales

Instead of

dpkg-reconfigure locales

It works for me

arnolem
  • 109
  • 2