E: Sub-process /usr/bin/dpkg returned an error code (1)

I recently ran into the following error in Ubuntu (v 13.10).

E: Sub-process /usr/bin/dpkg returned an error code (1)

Due to this error i was not able to run the update. Here is the fix to this error.

First run:

$ sudo apt-get remove install-info

Then run this command to clear apt archives:

$ sudo apt-get clean

Then finally run

$ sudo apt-get update
$ sudo apt-get upgrade

Setup Google App Engine Python SDK in Ubuntu

First of all download Google App Engine SDK for Linux.

Extract it anywhere within your local folder. It can be anywhere such as in your home directory or Documents directory.

Open terminal (ctrl+alt+t) and navigate to your home directory and open .bashrc to edit with this command:

$ sudo gedit .bashrc

At the end of the file, add these lines by changing the directory to your google_appengine folder. The first line is just a comment and in the second line /usr/local/google_appengine is the path to the google_appengine folder.

### Added for GAE
export PATH="/usr/local/google_appengine:$PATH"

Now restart your computer and then you should be able to use $ dev_appserver.py command from anywhere.