I've had the same problem, and my version of python is 2.5.2.
Code:
~$ sudo calibre_postinstall
Trying to setup udev rules...
* Restarting Hardware abstraction layer hald [ OK ]
Setting up bash completion... failed
Traceback (most recent call last):
File "build/bdist.linux-i686/egg/calibre/linux.py", line 168, in setup_completion
File "build/bdist.linux-i686/egg/calibre/gui2/lrf_renderer/main.py", line 1, in <module>
File "build/bdist.linux-i686/egg/calibre/gui2/library.py", line 18, in <module>
File "build/bdist.linux-i686/egg/calibre/library/database.py", line 11, in <module>
File "build/bdist.linux-i686/egg/calibre/ebooks/metadata/meta.py", line 11, in <module>
File "build/bdist.linux-i686/egg/calibre/ebooks/metadata/lit.py", line 12, in <module>
File "build/bdist.linux-i686/egg/calibre/ebooks/lit/reader.py", line 371, in <module>
File "build/bdist.linux-i686/egg/calibre/ebooks/lit/reader.py", line 374, in LitReader
TypeError: 'resolve_entities' is an invalid keyword argument for this function
Traceback (most recent call last):
File "/usr/bin/calibre_postinstall", line 8, in <module>
load_entry_point('calibre==0.4.89', 'console_scripts', 'calibre_postinstall')()
File "build/bdist.linux-i686/egg/calibre/linux.py", line 430, in post_install
File "build/bdist.linux-i686/egg/calibre/linux.py", line 304, in setup_completion
UnboundLocalError: local variable 'manifest' referenced before assignment
I run Ubuntu Hardy. Maybe I'll just wait the release of Ibex.