Let us know how it goes.
I started a few threads on my adventures using my Sony 900 with Ubuntu.
https://www.mobileread.com/forums/showthread.php?t=77989
https://www.mobileread.com/forums/showthread.php?t=77999
https://www.mobileread.com/forums/showthread.php?t=77014
Whatever you do, if you need to reinstall, be sure you completely uninstall Calibre.
I jacked up my whole library and had to redo it.
Also, I don't know if this has anything to do with it, but my p7zip got messed up and I reinstalled it just before installing Calibre via the script. After doing that, Calibre installed.
You can reinstall p7zip via synaptic, if it helps.