PDA

View Full Version : [ubuntu] 10.10 Problem with Update Manager



joyous
January 18th, 2011, 12:40 PM
Hi folks,

I have upgraded my ubuntu via online from 9.10-10.04-10.10. My recent kernel is Linux 2.6-35-24-generic. While I was trying to remove the old kernels via synaptic package manager, a problem occurred and
after that I am not able to install any software or updates. I tried sudo apt-get autoclean;, sudo apt-get update', ''sudo apt-get install -f' through terminal, but every time I failed and got the same errors.
Here is the errors.

"sujay@Rigel:$ sudo apt-get update
[sudo] password for sujay:
Get:1 http://dl.google.com stable Release.gpg [197B]
Ign http://dl.google.com/linux/chrome/deb/ stable/main Translation-en
Ign http://dl.google.com/linux/chrome/deb/ stable/main Translation-en_IN
Get:2 http://dl.google.com stable Release.gpg [197B]
'................................................. ..............
.................................................. ..............
Hit http://archive.ubuntu.com maverick-security/restricted i386 Packages
Hit http://archive.ubuntu.com maverick-security/universe i386 Packages
Hit http://archive.ubuntu.com maverick-security/multiverse i386 Packages
Fetched 4,988B in 23s (211B/s)
Reading package lists... Done
sujay@Rigel:$ sudo apt-get install -f
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following packages will be REMOVED:
linux-image-2.6.31-22-generic linux-image-2.6.32-25-generic
0 upgraded, 0 newly installed, 2 to remove and 59 not upgraded.
2 not fully installed or removed.
After this operation, 189MB disk space will be freed.
Do you want to continue [Y/n]? y
(Reading database ... 298321 files and directories currently installed.)
Removing linux-image-2.6.31-22-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.31-22-generic /boot/vmlinuz-2.6.31-22-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.31-22-generic /boot/vmlinuz-2.6.31-22-generic
Generating grub.cfg ...
/etc/grub.d/10_linux: 160: Syntax error: "then" unexpected (expecting "done")
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.31-22-generic.postrm line 320.
dpkg: error processing linux-image-2.6.31-22-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-2.6.32-25-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.32-25-generic /boot/vmlinuz-2.6.32-25-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.32-25-generic /boot/vmlinuz-2.6.32-25-generic
Generating grub.cfg ...
/etc/grub.d/10_linux: 160: Syntax error: "then" unexpected (expecting "done")
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm line 321.
dpkg: error processing linux-image-2.6.32-25-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-2.6.31-22-generic
linux-image-2.6.32-25-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)"

Does anyone know how to fix this? Please help.
Thanks in advance.

Regards
sujay.

watwat
January 18th, 2011, 01:25 PM
sorry, I can not give solutions to your problems ....

Maybe better you install Ubuntu directly 10.10 from live DVD or USB because it is more stable and faster

CMIIW

dino99
January 18th, 2011, 01:44 PM
clean the sources:

sudo rm /var/cache/apt/archives/*

then update upgrade again

Question: why are you downloading from Google, might unchecked non genuine ubuntu repo(s)

joyous
January 18th, 2011, 04:04 PM
clean the sources:

sudo rm /var/cache/apt/archives/*

then update upgrade again

Question: why are you downloading from Google, might unchecked non genuine ubuntu repo(s)

Hi dino,

No way....again got exactly the same errors.

".............Fetched 75.7MB in 1h 24min 6s (15.0kB/s)
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 298321 files and directories currently installed.)
Removing linux-image-2.6.31-22-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.31-22-generic /boot/vmlinuz-2.6.31-22-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.31-22-generic /boot/vmlinuz-2.6.31-22-generic
Generating grub.cfg ...
/etc/grub.d/10_linux: 160: Syntax error: "then" unexpected (expecting "done")
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.31-22-generic.postrm line 320.
dpkg: error processing linux-image-2.6.31-22-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Removing linux-image-2.6.32-25-generic ...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.32-25-generic /boot/vmlinuz-2.6.32-25-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.32-25-generic /boot/vmlinuz-2.6.32-25-generic
Generating grub.cfg ...
/etc/grub.d/10_linux: 160: Syntax error: "then" unexpected (expecting "done")
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm line 321.
dpkg: error processing linux-image-2.6.32-25-generic (--remove):
subprocess installed post-removal script returned error exit status 1
Errors were encountered while processing:
linux-image-2.6.31-22-generic
linux-image-2.6.32-25-generic
E: Sub-process /usr/bin/dpkg returned an error code (1)".

I don't know why is this happening ?

Thanks.
sujay

matt_symes
January 18th, 2011, 04:17 PM
Hi


Generating grub.cfg ...
/etc/grub.d/10_linux: 160: Syntax error: "then" unexpected (expecting "done")
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm line 321.

That is your problem. Please post the output of


/etc/grub.d/10_linux

and


/var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm

10_linux is failing when being called by the post removal script to uninstall the kernel.

Please post between code tags, otherwise you will have a huge post.

Kind regards

dino99
January 18th, 2011, 04:17 PM
have you checked your sources ? (use only genuine ubuntu repo)

open synaptic:

on left side look for broken package(s)

remove/purge (right click) the package you want to remove

install gtkorphan, then use it (system admin orphan) by selecting ALL on the dialog bottom box (after synaptic closed)

into a terminal:
sudo dpkg-reconfigure -phigh -a
(could be long, dont stop it)

joyous
January 18th, 2011, 04:26 PM
Hi


Generating grub.cfg ...
/etc/grub.d/10_linux: 160: Syntax error: "then" unexpected (expecting "done")
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 2
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm line 321.

That is your problem. Please post the output of


/etc/grub.d/10_linux

and


/var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm

10_linux is failing when being called by the post removal script to uninstall the kernel.

Please post between code tags, otherwise you will have a huge post.

Kind regards

Hi,

Here is the output from the two codes......
sujay@Rigel:$ /etc/grub.d/10_linux
/etc/grub.d/10_linux: 160: Syntax error: "then" unexpected (expecting "done")
sujay@Rigel:$ /var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 2.6.32-25-generic /boot/vmlinuz-2.6.32-25-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 2.6.32-25-generic /boot/vmlinuz-2.6.32-25-generic
grub-mkconfig: You must run this as root
run-parts: /etc/kernel/postrm.d/zz-update-grub exited with return code 1
Failed to process /etc/kernel/postrm.d at /var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm line 321.
sujay@Rigel:$

Thanks.
sujay

joyous
January 18th, 2011, 04:42 PM
have you checked your sources ? (use only genuine ubuntu repo)

open synaptic:

on left side look for broken package(s)

remove/purge (right click) the package you want to remove

install gtkorphan, then use it (system admin orphan) by selecting ALL on the dialog bottom box (after synaptic closed)

into a terminal:
sudo dpkg-reconfigure -phigh -a
(could be long, dont stop it)

Hi,

There is no broken package in synaptic manager. There are two packages in Installed (Auto removal) sections.
Linux kernel image for version 2.6.31 on x86/x86_64
Linux kernel image for version 2.6.32 on x86/x86_64

When i marked them for complete removal and applied the changes, the same errors are repeating.

Thanks.
sujay.

joyous
January 18th, 2011, 04:45 PM
have you checked your sources ? (use only genuine ubuntu repo)

open synaptic:

on left side look for broken package(s)

remove/purge (right click) the package you want to remove

install gtkorphan, then use it (system admin orphan) by selecting ALL on the dialog bottom box (after synaptic closed)

into a terminal:
sudo dpkg-reconfigure -phigh -a
(could be long, dont stop it)

Hi,

There is no broken package in synaptic manager. There are two packages in Installed (Auto removal) sections.
Linux kernel image for version 2.6.31 on x86/x86_64
Linux kernel image for version 2.6.32 on x86/x86_64

When i marked them for complete removal and applied the changes, the same errors are repeating.

Thanks.
sujay.

joyous
January 18th, 2011, 04:47 PM
have you checked your sources ? (use only genuine ubuntu repo)

open synaptic:

on left side look for broken package(s)

remove/purge (right click) the package you want to remove

install gtkorphan, then use it (system admin orphan) by selecting ALL on the dialog bottom box (after synaptic closed)

into a terminal:
sudo dpkg-reconfigure -phigh -a
(could be long, dont stop it)

Hi,

There is no broken package in synaptic manager. There are two packages in Installed (Auto removal) sections.
Linux kernel image for version 2.6.31 on x86/x86_64
Linux kernel image for version 2.6.32 on x86/x86_64

When i marked them for complete removal and applied the changes, the same errors are repeating.

Thanks.
sujay.

dino99
January 18th, 2011, 04:52 PM
from that path delete the kernel you want to remove:

cd /var/lib/dpkg/info/

/var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm

or easier: use nautilus

joyous
January 19th, 2011, 07:34 AM
from that path delete the kernel you want to remove:

cd /var/lib/dpkg/info/

/var/lib/dpkg/info/linux-image-2.6.32-25-generic.postrm

or easier: use nautilus

Hi dino,

Thank you very very much. It works and now I am again able

to install softwares.

Regards
sujay :guitar: