Need to resolve a dependency error: libc6 : Breaks: locales (< 2.19)

15,066

From the logs it is clear that you have debian repositories in your /etc/apt/sources.list. Remove whatever that has ftp.no.debian.org in /etc/apt/sources.list and run sudo apt-get clean && sudo apt-get update && sudo apt-get upgrade.

Share:
15,066

Related videos on Youtube

Apathetic
Author by

Apathetic

Updated on September 18, 2022

Comments

  • Apathetic
    Apathetic over 1 year

    I could use some advice on how to get around an error message I received when attempting to install a program from the makemkv ppa. I've attempted to run install with the -f command, but the error message isn't clear enough for me to know what to attempt next.

    I'm unaware of what you'll need to know to help me with this, so please let me know. It's a headless 14.04 Ubuntu server that briefly had Lubuntu-Desktop installed.

    USER@SYSTEM:~$ sudo apt-get install -f
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    Correcting dependencies... Done
    The following extra packages will be installed:
      locales
    The following packages will be upgraded:
      locales
    1 upgraded, 0 newly installed, 0 to remove and 944 not upgraded.
    4 not fully installed or removed.
    Need to get 0 B/3,954 kB of archives.
    After this operation, 7,032 kB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Preconfiguring packages ...
    (Reading database ... 706151 files and directories currently installed.)
    Preparing to unpack .../locales_2.19-18+deb8u2_all.deb ...
    Unpacking locales (2.19-18+deb8u2) over (2.13+git20120306-12) ...
    dpkg: error processing archive /var/cache/apt/archives/locales_2.19-18+deb8u2_all.deb (--unpack):
     trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.19-0ubuntu6.6
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Errors were encountered while processing:
     /var/cache/apt/archives/locales_2.19-18+deb8u2_all.deb
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    
    USER@SYSTEM:~$ sudo apt-get autoremove 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    You might want to run 'apt-get -f install' to correct these.
    The following packages have unmet dependencies:
     libc6 : Breaks: locales (< 2.19)
    E: Unmet dependencies. Try using -f.
    
    USER@SYSTEM:~$ locale
    LANG=en_US.UTF-8
    LANGUAGE=
    LC_CTYPE="en_US.UTF-8"
    LC_NUMERIC="en_US.UTF-8"
    LC_TIME="en_US.UTF-8"
    LC_COLLATE="en_US.UTF-8"
    LC_MONETARY="en_US.UTF-8"
    LC_MESSAGES="en_US.UTF-8"
    LC_PAPER="en_US.UTF-8"
    LC_NAME="en_US.UTF-8"
    LC_ADDRESS="en_US.UTF-8"
    LC_TELEPHONE="en_US.UTF-8"
    LC_MEASUREMENT="en_US.UTF-8"
    LC_IDENTIFICATION="en_US.UTF-8"
    LC_ALL=
    
    USER@SYSTEM:~$ uname -r
    3.13.0-66-generic
    

    And the lines from the install:

    USER@SYSTEM:~$ sudo apt-get install makemkv-bin 
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      libavcodec54 libavutil52 libc-dev-bin libc6 libc6-dev libc6-i386 libgsm1
      libmp3lame0 libopenjpeg2 libopus0 liborc-0.4-0 libschroedinger-1.0-0
      libspeex1 libtheora0 libx264-142 libxvidcore4 locales makemkv-oss
    Suggested packages:
      glibc-doc opus-tools speex
    The following NEW packages will be installed:
      libavcodec54 libavutil52 libc6-i386 libgsm1 libmp3lame0 libopenjpeg2
      libopus0 liborc-0.4-0 libschroedinger-1.0-0 libspeex1 libtheora0 libx264-142
      libxvidcore4 makemkv-bin makemkv-oss
    The following packages will be upgraded:
      libc-dev-bin libc6 libc6-dev locales
    4 upgraded, 15 newly installed, 0 to remove and 944 not upgraded.
    Need to get 21.3 MB of archives.
    After this operation, 61.3 MB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Get:1 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe libavutil52 amd64 6:9.18-0ubuntu0.14.04.1 [67.1 kB]
    Get:2 http://ppa.launchpad.net/heyarje/makemkv-beta/ubuntu/ trusty/main makemkv-oss amd64 1.9.9-1~trusty [1,175 kB]
    Get:3 http://ftp.no.debian.org/debian/ stable/main locales all 2.19-18+deb8u2 [3,954 kB]
    Get:4 http://us.archive.ubuntu.com/ubuntu/ trusty/universe libgsm1 amd64 1.0.13-4 [27.1 kB]
    Get:5 http://us.archive.ubuntu.com/ubuntu/ trusty/universe libopenjpeg2 amd64 1.3+dfsg-4.7ubuntu1 [64.3 kB]
    Get:6 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/universe libavcodec54 amd64 6:9.18-0ubuntu0.14.04.1 [2,349 kB]
    Get:7 http://ftp.no.debian.org/debian/ stable/main libc6-dev amd64 2.19-18+deb8u2 [2,002 kB]
    Get:8 http://ppa.launchpad.net/heyarje/makemkv-beta/ubuntu/ trusty/main makemkv-bin amd64 1.9.9-1~trusty [2,291 kB]
    Get:9 http://ftp.no.debian.org/debian/ stable/main libc-dev-bin amd64 2.19-18+deb8u2 [237 kB]
    Get:10 http://ftp.no.debian.org/debian/ stable/main libc6 amd64 2.19-18+deb8u2 [4,666 kB]
    Get:11 http://ftp.no.debian.org/debian/ stable/main libmp3lame0 amd64 3.99.5+repack1-7+deb8u1 [353 kB]
    Get:12 http://ftp.no.debian.org/debian/ stable/main libopus0 amd64 1.1-2 [156 kB]
    Get:13 http://ftp.no.debian.org/debian/ stable/main liborc-0.4-0 amd64 1:0.4.22-1 [141 kB]
    Get:14 http://ftp.no.debian.org/debian/ stable/main libschroedinger-1.0-0 amd64 1.0.11-2.1 [295 kB]
    Get:15 http://ftp.no.debian.org/debian/ stable/main libspeex1 amd64 1.2~rc1.2-1 [54.9 kB]
    Get:16 http://ftp.no.debian.org/debian/ stable/main libtheora0 amd64 1.1.1+dfsg.1-6 [171 kB]
    Get:17 http://ftp.no.debian.org/debian/ stable/main libx264-142 amd64 2:0.142.2431+gita5831aa-1+b2 [587 kB]
    Get:18 http://ftp.no.debian.org/debian/ stable/main libxvidcore4 amd64 2:1.3.3-1 [282 kB]
    Get:19 http://ftp.no.debian.org/debian/ stable/main libc6-i386 amd64 2.19-18+deb8u2 [2,378 kB]
    Fetched 21.3 MB in 11s (1,902 kB/s)
    *[GIT update removed]*
    Preconfiguring packages ...
    (Reading database ... 706150 files and directories currently installed.)
    Preparing to unpack .../locales_2.19-18+deb8u2_all.deb ...
    Unpacking locales (2.19-18+deb8u2) over (2.13+git20120306-12) ...
    dpkg: error processing archive /var/cache/apt/archives/locales_2.19-18+deb8u2_all.deb (--unpack):
     trying to overwrite '/usr/sbin/validlocale', which is also in package libc-bin 2.19-0ubuntu6.6
    dpkg-deb: error: subprocess paste was killed by signal (Broken pipe)
    Preparing to unpack .../libc6-dev_2.19-18+deb8u2_amd64.deb ...
    Unpacking libc6-dev:amd64 (2.19-18+deb8u2) over (2.19-0ubuntu6.6) ...
    Preparing to unpack .../libc-dev-bin_2.19-18+deb8u2_amd64.deb ...
    Unpacking libc-dev-bin (2.19-18+deb8u2) over (2.19-0ubuntu6.6) ...
    dpkg: considering deconfiguration of locales, which would be broken by installation of libc6:amd64 ...
    dpkg: yes, will deconfigure locales (broken by libc6:amd64)
    Preparing to unpack .../libc6_2.19-18+deb8u2_amd64.deb ...
    De-configuring locales (2.13+git20120306-12) ...
    Unpacking libc6:amd64 (2.19-18+deb8u2) over (2.19-0ubuntu6.6) ...
    Processing triggers for man-db (2.6.7.1-1) ...
    Errors were encountered while processing:
     /var/cache/apt/archives/locales_2.19-18+deb8u2_all.deb
    *[Git update removed]*
     create mode 100644 ld.so.nohwcap
    E: Sub-process /usr/bin/dpkg returned an error code (1)
    

    For reference:

    USER@SERVER:~$ apt-cache policy locales
    locales:
      Installed: 2.13+git20120306-12
      Candidate: 2.19-18+deb8u2
      Version table:
         2.19-18+deb8u2 0
            500 http://ftp.no.debian.org/debian/ stable/main amd64 Packages
         2.13+git20120306-12.1 0
            500 http://us.archive.ubuntu.com/ubuntu/ trusty-updates/main amd64 Packages
     *** 2.13+git20120306-12 0
            500 http://us.archive.ubuntu.com/ubuntu/ trusty/main amd64 Packages
            100 /var/lib/dpkg/status
    
    • Ron
      Ron over 8 years
      Possible duplicate of Ubuntu 14.04 Server upgrade error
    • Apathetic
      Apathetic over 8 years
      I ran the command at the end that was strongly not recommended, and it resolved the issues I was having with apt-get. Thanks for the link. It's too bad I can't continue to run makemkv-beta, but I'll just run that on a different machine that's not relying on a mixed ecosystem.
  • Apathetic
    Apathetic over 8 years
    You're right, there is a line like that in the list deb ftp.no.debian.org/debian stable main contrib non-free I don't believe removing it is my solution though, as I didn't set this system up, and it wasn't causing errors with installing other packages. I think I'll just scrap adding makemkv-beta to this machine.
  • Apathetic
    Apathetic over 8 years
    So I decided to abort installing makemkv-beta on this machine, but I'm unsure how to go about making the changes. I attempted to comment out the ppa for the package, and then run update/clean but it didn't stop attempting to install locales. I commented out the ftp.no.debian.ect link from sources, and now it wants to uninstall some packages REMOVED: language-pack-en language-pack-en-base locales ubuntu-minimal but seeing ubuntu-minimal in that list is worrisome to me.
  • Apathetic
    Apathetic over 8 years
    It helped understand that this might be the cause, but I don't have a solution at this time. I'm unclear how to even abort the installs I attempted earlier.