Skip to content

FreeBSD unrar cffi installation instructions

evilhero edited this page Mar 2, 2020 · 4 revisions

When doing the pip -r install requirements.txt, FBSD users will most likely receive an error pertaining to unrarsrc not being able to build and failing on unrar-cffi installation (or not being able to locate a package). Thanks to @btxgit and @ryusaku for working thru this and testing it, this seems to be the work-thru:

  1. Download the src file here: most recent source of unrar-cffi

  2. Install the gmake package if required: pkg install gmake (note this might not be necessary on some systems)

  3. Unzip the src file somewhere and change (cd) into the directory

  4. This can be done in 2 different ways:

    • From the command line: MAKE=gmake python setup.py build

      ---OR---

    • Edit buildconf.py

      • change [getenv("MAKE", 'make') ... ---> [getenv("MAKE", 'gmake') ....
      • then save/overwrite the buildconf.py file
  5. python setup.py build

  6. python setup.py install

to test, go into a command line python prompt:

import unrar.cffi

(if it comes back with an error, it's not installed. If it just goes to the next line, it's installed).