The following packages have been unpacked but not yet configured.
They must be configured using dpkg --configure or the configure menu option in dselect for them to work:
linux-image-generic Generic Linux kernel image
linux-generic Complete Generic Linux kernel
The following packages are only half configured, probably due to problems configuring them the first time. The configuration should be retried using dpkg --configure <package> or the configure menu option in dselect:
linux-image-3.2.0-34-generic Linux kernel image for version 3.2.0 on 32 bit x8

but dpkg --configure linux-image-3.2.0-34-generic linux-image-generic linux-generic results in the following error message:

1 Answer
1

You have a bogus pwd (print working directory) command, somehow. I took a look at the referenced line in the postinst script. It is trying to "save" the working directory by storing the output of pwd in a variable, and then, on the referenced line, switching back to this directory after doing a few things in other directories. The problem happens because the pwd called somehow has empty output.

Run the command which pwd. If the output isn't /bin/pwd, find out why and fix it.

pwd seems to work fine and which pwd outputs /bin/pwd as it should.
–
nalvoryDec 29 '12 at 12:23

I played around with some perl scripts and I noticed that pwd doesn't work from within perl apparently, it just returns an empty string. Running which pwd from within the perl script returns /bin/pwd though. How is this possible? As I said above, running pwd in the terminal works just fine...
–
nalvoryDec 29 '12 at 13:42

1

That's really weird. I'm trying to figure out why that would be, but I'm no perl expert. In any case, I'm fairly certain that it's a bug that the postinst script calls pwd instead of using Perl's own Cwd like it ought to.
–
tgiesDec 29 '12 at 13:54

I substituted all occurrences of pwd in /var/lib/dpkg/info/linux-image-3.2.0-34-generic.postinst with getcwd() and now everything seems to work again! Thanks a lot, tgies!
–
nalvoryDec 29 '12 at 14:40

I was going to suggest that as a solution to your immediate problem. It is still a point of concern that pwd isn't working from Perl for you.
–
tgiesDec 29 '12 at 14:46