0

I am having a problem when I type the command locale:


$ locale

Command 'locale' not found, but can be installed with:

sudo apt install libc-bin


I tried installing libc-bin


$ sudo apt install libc-bin

Reading package lists... Done

Building dependency tree

Reading state information... Done

Some packages could not be installed. This may mean that you have requested an impossible situation or if you are using the unstable distribution that some required packages have not yet been created or been moved out of Incoming.

The following information may help to resolve the situation:

The following packages have unmet dependencies:

libc-bin : Depends: libc6 (< 2.28) but 2.28-8 is to be installed

E: Unable to correct problems, you have held broken packages.


I tried to downgrade the libc6 to 2.28-8 by using this command:

$ sudo apt install libc6=2.28-8

Reading package lists... Done

Building dependency tree

Reading state information... Done

libc6 is already the newest version (2.28-8).

The following packages were automatically installed and are no longer required:

at debugedit dh-python gir1.2-harfbuzz-0.0 icu-devtools libarchive-cpio-perl libfile-stripnondeterminism-perl libftgl2 libgfortran-7-dev libglib2.0-dev-bin libgraphite2-dev libgssrpc4 libharfbuzz-gobject0 libicu-le-hb0 libiculx60 libkadm5clnt-mit11 libkadm5srv-mit11 libkdb5-9 libltdl-dev libpcre16-3 libpcre32-3 libpcrecpp0v5 libpng-tools librpmbuild8 librpmsign8 libxrender-dev

linux-libc-dev lsb-security pax python-all rpm

Use 'sudo apt autoremove' to remove them.

0 upgraded, 0 newly installed, 0 to remove and 26 not upgraded.


Finally I tried to upgrade using:


$sudo apt upgrade

Reading package lists... Done

Building dependency tree

Reading state information... Done

Calculating upgrade... Done

The following packages were automatically installed and are no longer required:

at debugedit dh-python gir1.2-harfbuzz-0.0 icu-devtools libarchive-cpio-perl libfile-stripnondeterminism-perl libftgl2 libgfortran-7-dev libglib2.0-dev-bin libgraphite2-dev libgssrpc4 libharfbuzz-gobject0 libicu-le-hb0 libiculx60 libkadm5clnt-mit11 libkadm5srv-mit11 libkdb5-9 libltdl-dev libpcre16-3 libpcre32-3 libpcrecpp0v5 libpng-tools librpmbuild8 librpmsign8 libxrender-dev linux-libc-dev lsb-security pax python-all rpm Use 'sudo apt autoremove' to remove them. The following packages will be upgraded: distro-info-data firefox firefox-locale-en firefox-locale-fr ghostscript ghostscript-x gnome-shell gnome-shell-common gnome-software gnome-software-common gnome-software-plugin-snap libavcodec57 libavfilter6 libavformat57 libavresample3 libavutil55 libgs9 libgs9-common libpostproc54 libswresample2 libswscale4 netplan.io nplan ubuntu-software unattended-upgrades wpasupplicant

26 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Need to get 0 B/68.8 MB of archives.

After this operation, 27.6 kB of additional disk space will be used.

Do you want to continue? [Y/n] y

Can't exec "locale": No such file or directory at /usr/share/perl5/Debconf/Encoding.pm line 16.

Use of uninitialized value $Debconf::Encoding::charmap in scalar chomp at /usr/share/perl5/Debconf/Encoding.pm line 17.

Preconfiguring packages ...

dpkg: warning: 'ldconfig' not found in PATH or not executable

dpkg: error: 1 expected program not found in PATH or not executable

Note: root's PATH should usually contain /usr/local/sbin, /usr/sbin and /sbin

E: Sub-process /usr/bin/dpkg returned an error code (2)


Could some one please help me in solving such problem?

Thank you in advance

  • 1
    You didn't specify what release you are running, and the package I looked up didn't match up with anything current (packages.ubuntu.com/…) so I'd assume your issue is your sources. – guiverc May 9 at 10:17
  • Sorry, I forget to mention the release: $ lsb_release -a LSB Version: security-9.20170808ubuntu1-noarch Distributor ID: Ubuntu Description: Ubuntu 18.04.2 LTS Release: 18.04 Codename: bionic – Mohamad Kozeiha May 9 at 10:20

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.