TurnKey Linux Virtual Appliance Library

Can't use dpkg-reconfigure

I was going to update the system (apt-get update && apt-get upgrade) but it needed to reconfigure phpmyadmin (using dpkg-reconfigure) which I for some reason couldn't navigate. The normal keys for this are space for ticking a checkbox, arrows to move up and down, tab to move around the different fields and enter to ok/cancel/next. None of these works. I got past the phpmyadmin configuration somehow, don't really know why, but there are still three unconfigured packages and when running apt-get upgrade it invokes dpkg-reconfigure console-setup which I can't for my life seem to navigate.

When I press up, it just outputs ^[[A, down ^[[B etc. and the colors are all weird.

Tab just does what tab usually does (hops to the right) and enter seems to work in the sense that it exists the installation with error: 

# apt-get upgrade

Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
3 not fully installed or removed.
After this operation, 0B of additional disk space will be used.
Do you want to continue [Y/n]?
Setting up console-setup (1.21ubuntu9) ...
dpkg: error processing console-setup (--configure):
 subprocess post-installation script returned error exit status 10
dpkg: dependency problems prevent configuration of kbd:
 kbd depends on console-setup | console-common; however:
  Package console-setup is not configured yet.
  Package console-common is not installed.
dpkg: error processing kbd (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of inithooks:
 inithooks depends on kbd; however:
  Package kbd is not configured yet.
dpkg: error processing inithooks (--configure):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 console-setup
 kbd
 inithooks
E: Sub-process /usr/bin/dpkg returned an error code (1)

What could be the cause of this? As for terminals I've tried Putty, Shellinabox, Gnome-terminal and Xterm so the problem is definitely serverside.

Jeremy's picture

I have had that same experience

But that was with a TKL 2009.x appliance running under OpenVZ (which doesn't have a 'proper' console). I have not had this issue with TKL v11.x (even under OVZ) so I'm not much immediate help to you.

What version are you using? What modifications have you made? Is it a VM or running on bare metal?

TKL Wordpress (seems to be

TKL Wordpress (seems to be running 8.04) and yeah it's a VPS (OpenVZ). I've made a few minor tweaks here and there but nothing drastic. How did you get over the problem on 2009.x?

Jeremy's picture

It happened to me when I made my own OVZ templates

So to resolve it I hunted down the cause and removed it as a step in my OVZ template creation process. The problematic line was:

update-rc.d -f consolefont remove

When I left that as default (ie didn't include it) it worked ok, although I do vaguely recall still having some issues at times. I have now migrated most of my servers to TKL v11.x now though so I can't confirm that.

From memory any interactive console stuff within my OVZ appliances (prior to resolving the issue) resulted in this same behaviour (any of the screens that are normally blue background).

Perhaps try enabling 'consolefont':

update-rc.d -f consolefont defaults

Not sure if that will work for you or not...? Also your console output suggests that console-common isn't installed, perhaps try manually installing it and/or manually installing console-setup.

Hmm

I don't know what I did but it worked. I messed around with debconf (trying to change frontend to readline and noninteractive) without much success, tried --force with dpkg-reconfigure but I just got a bunch of error messages whatever I did. So I rebooted the VPS, ran apt-get update && apt-get upgrade and everything behaved normally so I got everything configured! Computers can be weird sometimes. ;)

Thanks a bunch for the help in any case!

Post new comment

The content of this field is kept private and will not be shown publicly. If you have a Gravatar account, used to display your avatar.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <strike> <caption>

More information about formatting options

Leave this field empty. It's part of a security mechanism.
(Dear spammers: moderators are notified of all new posts. Spam is deleted immediately)