7

I'm having trouble installing libunrar.so. It's required for Calibre to convert CBR files.

Anyone an idea on where to get it (package or source)?

8

My PPA contains a libunrar package, if you don't feel like messing around with a manual install.

sudo apt-add-repository ppa:bodiltv/ppa
sudo apt-get update
sudo apt-get install calibre

(or just libunrar : sudo apt-get install libunrar)

3

download calibre

http://sourceforge.net/projects/calibre/files/

select your system :

64 bits : calibre-x.x.xx-x86_64.tar.bz2

32 bits : calibre-x.x.xx-i686.tar.bz2

extract that file and find libunrar.so in the main directory

copy libunrar.so into "/usr/lib" folder

3
  • 5
    Put libunrar.so in /usr/local/lib, not in /usr/lib. Never touch anything under /usr outside /usr/local without going through the package manager. Also, run sudo ldconfig after you've installed a .so manually. Oct 17 '10 at 17:52
  • @Gilles, i think is not necesary execute ldconfig in this case because only use (/lib and /usr/lib) man ldconfig and you are using /usr/local/lib
    – hhlp
    Oct 17 '10 at 18:14
  • I have found it named unrar.so rather than libunrar.so by the way.
    – Ivan
    Sep 17 '16 at 23:51
2

you can grab the libunrar.so file from the latest files here http://sourceforge.net/projects/calibre/files/ , make sure to get the right architecture for your system. i got calibre-0.7.23-x86_64.tar.bz2 myself because i have a 64-bit system.

you can then put that libunrar.so file in /usr/lib and hopefully it should work okay

1
  • 2
    Put libunrar.so in /usr/local/lib, not in /usr/lib. Never touch anything under /usr outside /usr/local without going through the package manager. Also, run sudo ldconfig after you've installed a .so manually. Oct 17 '10 at 17:53
1

Since Ubuntu 19.10 it is packaged in the repositories as libunrar5:

sudo apt install libunrar5

It will install the library as /usr/lib/x86_64-linux-gnu/libunrar.so.5, assuming a 64-bit Ubuntu. Since 20.04 there's no 32-bit (i386) version on repositories.

You could also download UnRAR source directly from the official RARLab website and easily build unrarlib.so from source:

wget 'https://www.rarlab.com/rar/unrarsrc-5.9.4.tar.gz'
tar -xf 'unrarsrc-5.9.4.tar.gz'
cd unrar
make lib

That will produce unrarlib.so in the newly created unrar directory. Now just move/copy/symlink it to /usr/local/lib and you're good to go!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.