Could’t find path to unrear Library

The original link: https://blog.csdn.net/ysy950803/article/details/52939708
Win:

    to RARLab first official download library files, http://www.rarlab.com/rar/UnRARDLL.exe, and installation; The best way to install is to choose the default path, usually in the C: Program Files (x86)\UnrarDLL\ directory; Then the important step is to add the environment variable, this computer (my computer) right click, properties, find advanced system Settings, advanced TAB under the environment variable, in the system variable (note not user variable) new, variable name input UNRAR_LIB_PATH, must be exactly the same, the value of the variable should pay special attention to! If you are a 64-bit system, type C:\Program Files (x86)\ Unrardll \x64\ Unrar64.dll, if you are a 32-bit system, type C:\Program Files (x86)\ Unrard.dll. Once you’re sure to save the environment variables, restart your PyCharm with the same code, and run it error-free. At this point the dependent libraries have been added to the system environment.

Linux needs to manually compile and generate the SO file itself, which is a bit more cumbersome:

    in the same way, the first to download the Source file, but it’s not like a Win for you packaging good, you need to download the Source code: http://www.rarlab.com/rar/unrarsrc-5.4.5.tar.gz, namely RARLab website to download the list of UnRAR Source, you can download the latest version; Make install-lib will automatically compile the library files. After the compilation is complete, use make install-lib to generate the libunrar.so file (normally located under /usr/lib). Finally, you still need to set the environment variable of your Linux system, find the profile file in the /etc/profile directory, which you can edit directly using the Vim /etc/profile command (even easier with WinSCP), add export UNRAR_LIB_PATH=/usr/lib/libunrar.so at the end of the profile, don’t put the comma in it. Save the variable successfully and then use the source /etc/profile command to make the variable effective. This way, if you run the py file again, you won’t get an error, at least you won’t be told that you can’t find the unrar library.

Sudo apt-get install g++ : sudo apt-get install g++ : sudo apt-get install g++ : sudo apt-get install g++ : sudo apt-get install
Source: author: acerola
CSDN
,
https://blog.csdn.net/ysy950803/article/details/52939708 copyright statement: this article original articles for bloggers, reproduced please attach link to blog!

Read More: