PDA

View Full Version : [ubuntu] Update Error



danharris83
April 8th, 2011, 10:06 AM
HI when i try to update using terminal and update manager i get this error

/usr/bin/dpkg: 1: Syntax error: "&" unexpected
E: Sub-process /usr/bin/dpkg returned an error code (2)

hope someone can help.

thanks dan harris

Dutch70
April 8th, 2011, 10:26 AM
Try running these commands and see if that fixes it.

dpkg --clean-avail
and then...

sudo apt-get update && sudo apt-get upgrade

danharris83
April 8th, 2011, 10:33 AM
when running
dkpg --clean-availi get this

bash: /usr/bin/dpkg: cannot execute binary file

edit: When doing a partial upgrade with update manager i get this error if it helps

Traceback (most recent call last):

File "/usr/bin/update-manager", line 101, in <module>
controler = DistUpgradeController(view, datadir=data_dir)

File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeController.py", line 126, in __init__
self.quirks = DistUpgradeQuirks(self, self.config)

File "/usr/lib/python2.6/dist-packages/DistUpgrade/DistUpgradeQuirks.py", line 53, in __init__
self.arch = Popen(["dpkg", "--print-architecture"], stdout=PIPE).communicate()[0]

File "/usr/lib/python2.6/subprocess.py", line 633, in __init__
errread, errwrite)

File "/usr/lib/python2.6/subprocess.py", line 1139, in _execute_child
raise child_exception

OSError: [Errno 8] Exec format error

Dutch70
April 8th, 2011, 11:37 AM
It's dpkg, as in debian package, not dkpg.

danharris83
April 8th, 2011, 12:01 PM
sorry that was just a typo still get the same error it happens when ever i try to install anything from the Ubuntu Sofware Centre

Dutch70
April 8th, 2011, 12:07 PM
Have you recently added RAM?

Try these 2 commands, and that's about all I really know to try.

sudo dpkg install -f

sudo apt-get --configure -a

danharris83
April 8th, 2011, 12:38 PM
Thanks for the reply I not added anything not sure wats happened I will try that when I get home tonight

danharris83
April 8th, 2011, 10:46 PM
I tried both of them still get the same error

/usr/bin/dpkg: 1: Syntax error: "&" unexpected