-1

i have installed unrar in linux system. Also followed http://www.cyberciti.biz/faq/open-rar-file-or-extract-rar-files-under-linux-or-unix/ this link for installation unrar library in linux system. i have set an UNRAR_LIB_PATH Environment variable (As it required for unrar) export UNRAR_LIB_PATH=/bin/unrar but when work with unrar from unrar import rarfile its send me below error

Couldn't find path to unrar library

Please help me out from this.

Community
  • 1
  • 1
  • 1
    Unsure, but it seems that python-unrar requires the unrar *library*, not the unrar *binary*. See the first link you posted. – Armin Rigo Aug 05 '15 at 13:55

1 Answers1

1

The link you give shows how to install the unrar command line tool. This isn't the unrar library.

The documentation of python-unrar shows you how to compile the unrar library yourself. You can only download it for Windows from the Rarlabs site. For Linux you will have to compile it yourself.

The error you have shows exactly your problem: "Couldn't find path to unrar library"

After compilation you could set your environment variable to something like this: UNRAR_LIB_PATH=/usr/lib/libunrar.so, but this isn't required if you don't install the library.

If you are using an old version of the module, you could also have this problem: https://github.com/davide-romanini/comictagger/issues/72

Gfy
  • 8,173
  • 3
  • 26
  • 46
  • Hey, I do not have the file libunrar.so anywhere on my system.. I just pip installed rar. Any thoughts? – ScipioAfricanus Jan 16 '19 at 04:48
  • Did you read my answer? Pip will install Python packages. Which package exactly did you install? python-unrar won't install the library for you. You need to do this yourself after a compilation step. I've linked to the documentation page explaining this process. – Gfy Jan 20 '19 at 20:20
  • I did pip install unrar only. I have intstalled ubuntu on my device, I wasnt sure which rar lib to pick from your link – ScipioAfricanus Jan 20 '19 at 21:35