Calibre No Longer Working
Solution 1
Unfortunately, at this moment the version of Calibre that is in the 20.04 repos is version 4.99 which does not work with Python 3. To make 4.99 work you would have to patch a file yourself as shown in the bug https://bugs.launchpad.net/ubuntu/+source/calibre/+bug/1898904 or you could download it from a different repository. Either way, Canonical has not patched 4.99 to work with 20.04 yet in the official repositories.
Also, quoted from Calibre themselves:
Please do not use your distribution provided calibre package, as those are often buggy/outdated. Instead use the Binary install described below.
You can download it from https://calibre-ebook.com/download_linux
You can also run the command from that site to install it (which is actually easier to install with):
sudo -v && wget -nv -O- https://download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin
I have added the above command to a script called install_calibre
so that I can run it anytime to update my Calibre to the newest version.
Hope this helps!
Solution 2
To fix this, it is not necessary to abandon Calibre 4.99. The cause of the crash is documented in bug #1898904, which can be fixed with a one-line patch. To manually apply the patch:
- open Terminal
- type:
sudo gedit /usr/lib/calibre/calibre/utils/ipc/server.py
- in Gedit, go to line 110
- change the line:
self._listener._unlink.cancel()
- to:
if self._listener._unlink is not None: self._listener._unlink.cancel()
- save and close Gedit
This change will be overwritten when Calibre is updated, but of course it won't matter because this bug has been fixed in the next version of Calibre.
Solution 3
Calibre is working properly again.
Calibre has been updated in Ubuntu 20.04 and later. The latest version of Calibre from the Ubuntu 20.04 default repositories is working properly again.
Solution 4
Sorry for interupting, This may not be an ideal go around, but maybe a temporary solution. I also face the same problem, in my Ubuntu 20.04, and I decided to install the flathub version instead and its being running fine up till now.
https://flathub.org/apps/details/com.calibre_ebook.calibre
Solution 5
https://download.calibre-ebook.com/4.html
Go to this site and download previous version. extract the file run the Calibre file (which as no extension) just double click.
Related videos on Youtube
![rory](https://i.stack.imgur.com/xvaU4.png?s=256&g=1)
rory
Updated on September 18, 2022Comments
-
rory almost 2 years
Calibre stopped working recently. Tried uninstalling and reinstalling.
When I open a terminal and call
$calibre
I get the following error message:Traceback (most recent call last): File "/usr/bin/calibre", line 20, in <module> sys.exit(calibre()) File "/usr/lib/calibre/calibre/gui_launch.py", line 73, in calibre main(args) File "/usr/lib/calibre/calibre/gui2/main.py", line 543, in main listener = create_listener() File "/usr/lib/calibre/calibre/gui2/main.py", line 514, in create_listener return Listener(address=gui_socket_address()) File "/usr/lib/calibre/calibre/utils/ipc/server.py", line 110, in __init__ self._listener._unlink.cancel() AttributeError: 'NoneType' object has no attribute 'cancel'
Do I need to install some dependency that the sudo apt install didn't get? I tried installing via command line and the software installer/updater GUI.
I'm on version Ubuntu 20.04.1 LTS. I made sure that my software in general is up to date also.
-
Terrance over 3 yearsFrom what I can see, Calibre 4.99 and under (which is what is in the 20.04 repos) was written for Python 2 and not Python 3. Calibre released version 5 for Python 3 which I wish was in the repos, but you can install it from calibre-ebook.com/download_linux 20.04 no longer has Python 2.
-
rory over 3 years@Terrance that did it thanks. Please make it an answer so I can mark it accordingly
-
Quaesitor Veritatem over 3 yearsinstalling the newer version (now it was 5.5) from the suggested link has worked like a charm
-
-
N0rbert over 3 yearsThere is a patch here - bugs.launchpad.net/ubuntu/+source/calibre/+bug/1898904 .
-
Terrance over 3 years@N0rbert Thanks for that. Reading this github.com/kovidgoyal/calibre/commit/… People are blaming Canonical for not upgrading the repo to 5. The patch doesn't look like it would be something super easy to install. Just my thoughts on it.
-
memeplex over 3 yearsI have requested a package sync bugs.launchpad.net/ubuntu/+source/calibre/+bug/1901921
-
memeplex over 3 yearsBTW, it's not fair to blame Canonical on this since the package is in Universe, it's community maintained.
-
Terrance over 3 years@memeplex I wasn't blaming them. It was people in the comments that were.
-
karel over 3 yearsUbuntu 21.04 default repositories will have Calibre 5.3 that works with Python 3.
-
Quaesitor Veritatem over 3 yearsinstalling the current v5.5 from the suggested link has worked like a charm
-
Nicholas Saunders over 3 yearsthis is not only the obvious solution but a general solution. (snap or flathub)
-
bitinerant over 3 yearsThis is not a Python 3 issue. Version 4.99 works well in Python 3. The crash is caused by bug #1898904; see other answer.
-
fixitmanarizona over 2 yearsA few days ago, Calibre (*version 4.99x) was installed and working. I did not uninstall it! And yet, it dissapeared from menus and nothing happened typing calibre in terminal. I don't recall what updates I applied in that time frame, it was only something like a security patch (probably Python) and somehow that silently uninstalled Calibre! running the " sudo -v && wget -nv -O- download.calibre-ebook.com/linux-installer.sh | sudo sh /dev/stdin " installed version 5.29 (october 2021) which works, but lost all my preferences for the UI.
-
Kvothe over 2 yearsIf I already installed the distribution version (which indeed is not working) should I uninstall it first (how?)?
-
Terrance over 2 years@Kvothe
sudo apt remove calibre
should do it.