13

I can't install any package, as I get this error:

installArchives() failed: E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
E: Cannot get debconf version. Is debconf installed?
debconf: apt-extracttemplates failed: No such file or directory
dpkg: regarding .../libgcc1_1%3a4.7.2-2ubuntu1_amd64.deb containing libgcc1:amd64, pre-dependency problem:
 libgcc1 pre-depends on multiarch-support
  multiarch-support is unpacked, but has never been configured.

dpkg: error processing /var/cache/apt/archives/libgcc1_1%3a4.7.2-2ubuntu1_amd64.deb (--unpack):
 pre-dependency problem - not installing libgcc1:amd64
Errors were encountered while processing:
 /var/cache/apt/archives/libgcc1_1%3a4.7.2-2ubuntu1_amd64.deb
Error in function: 
dpkg: dependency problems prevent configuration of libc6:amd64:
 libc6:amd64 depends on libgcc1; however:
  Package libgcc1 is not installed.
 libc6:amd64 depends on tzdata; however:
  Package tzdata is not installed.

dpkg: error processing libc6:amd64 (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of multiarch-support:
 multiarch-support depends on libc6 (>= 2.3.6-2); however:
  Package libc6:amd64 is not configured yet.

dpkg: error processing multiarch-support (--configure):
 dependency problems - leaving unconfigured
Tim
  • 32,861
  • 27
  • 118
  • 178
Mj125
  • 356
  • @EliahKagan I believe this is a different one. Looking at the info in the links you provided I don't see similar error messages. – gertvdijk Dec 28 '12 at 09:31
  • @gertvdijk I think you're right. The debconf: apt-extracttemplates failed: No such file or directory message is similar, but I see what you mean: In this question, that message is secondary to installArchives() failed: E: Cannot get debconf version. Is debconf installed? In that one it's the primary error message (no other error clearly occurring first to explain it). – Eliah Kagan Dec 28 '12 at 09:38

4 Answers4

23

Here the solution for this problem, super easy way ;)

You have to use dpkg direct to solve this problem sometimes.

"Here we go again"

The package multiarch-support is unpacked, but has never been configured this means the package soon will configure, but is not configured yet.

When is the status unpacked the package is not installed yet, so the package libgcc1 cannot install because of the dependency is not installed yet and cannot be installed before multiarch-support.

We have to force the installed status for multiarch-support to do the trick.

nano /var/lib/dpkg/status

find the the line starting with Package: something like:

Package: multiarch-support
Status: install ok unpacked

You have to change the unpacked to installed

Now try:

sudo dpkg --configure --pending
sudo apt-get install --reinstall multiarch-support libgcc1 debconf

I think you can get the system working again this way, let me known if you can do.

  • This fixed a slew of issues I was having on Raspbian with Pixel, including the UI based package manager. My /var/lib/dpkg directory was completely missing, so I did have to create that and a few directories underneath it when it complained, but in the end, this now allows me to use apt-get. – stevieb Jan 16 '17 at 23:56
1

I believe your /var/lib/dpkg directory with its contents is screwed up. Mainly because of this line, I think your package management is unrecoverable broken.

multiarch-support is unpacked, but has never been configured.

Additionally,

apt-extracttemplates failed: No such file or directory

Means that /usr/bin/apt-extracttemplates is not available on your system, which is really out of the ordinary.

This does not break by itself; either data corruption or user error (e.g. rm -rf files-you-should-never-delete) is the cause of this. My best bet would be on backing up your data (e.g. /home) and start with a fresh installation.

gertvdijk
  • 67,947
0

The problem may be that you do not have debconf installed. To install it or check if it is installed, type sudo apt-get install debconf in a terminal. You can bring up a terminal by pressing CTRL-ALT-T simultaneously.

This will install debconf if it isn't installed and upgrade it if it is installed but out-of date or do nothing if it is up-to-date.

Farid
  • 708
  • 1
    I do this, but It dosen't help. – Mj125 Nov 22 '12 at 18:01
  • 1
    I get this: debconf : PreDepends: perl-base (>= 5.6.1-4) but it is not going to be installed – Mj125 Nov 22 '12 at 18:06
  • 1
    @Mj125 Do this: sudo apt-get install perl-base – Lucio Nov 22 '12 at 18:07
  • no, I can't install any thing. – Mj125 Nov 22 '12 at 19:19
  • sudo apt-get install perl-base debconf. Try this. Two packages shouldn't be interdependent. – Farid Nov 23 '12 at 06:19
  • I get this:

    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 : Depends: libgcc1 but it is not going to be installed Depends: tzdata but it is not going to be installed perl-base : PreDepends: dpkg (>= 1.14.20) E: Unmet dependencies. Try 'apt-get -f install' with no packages (or specify a solution).

    – Mj125 Nov 23 '12 at 09:44
  • Did you try doing sudo apt-get-f install? – Farid Nov 23 '12 at 15:35
  • yes, but it dosen't help – Mj125 Nov 23 '12 at 16:54
  • Errors were encountered while processing: /var/cache/apt/archives/libgcc1_1%3a4.7.2-2ubuntu1_amd64.deb E: Sub-process /usr/bin/dpkg returned an error code (1) – Mj125 Nov 23 '12 at 16:55
  • @Mj125 It seems likely that the problem could be solved by manually downloading the necessary .deb packages and installing them all together with dpkg. But first, please update your question by editing it to include the information in comments here (especially the error messages). Please also include the output of dpkg -l | grep -E 'debconf|libc6|libgcc1|libgcc1|tzdata|perl-base', as that will reveal what if any versions of any of these packages may actually be installed. (After editing your question, if you comment with @EliahKagan in the comment, I'll be notified.) – Eliah Kagan Dec 28 '12 at 09:44
0

I got same problem because I have deleted /var/lib/dpkg/available, but now mine back normally after I do these steps

sudo cp /var/lib/dpkg/available-old /var/lib/dpkg/available

sudo dpkg --configure -a

source: https://answers.launchpad.net/ubuntu/+question/70504

muru
  • 197,895
  • 55
  • 485
  • 740