16

Is it possible to give options to a Homebrew installation package from the command line, something like this (which does not seem to work):

brew install tesseract --all-languages

Or do you have to use brew edit tesseract and actually edit your desired options into the file that opens?

(If the latter is the only way, why did they choose to do it like this? It seems very cumbersome.)

EDIT: I did uninstall, then install again with the option added, and now it seems to react. 1. Homebrew should have been able to understand the change without uninstalling first. 2. I can't see the option thing documented or mentioned anywhere.

  • If you don't want to end up with 1.2 Gb of languages for the sake of having one, you can manually download one language from the wiki and then mv <lang>.traineddata /usr/local/Cellar/tesseract/<version>/share/tessdata – Ciprian Tomoiagă Aug 8 '18 at 9:31
14

brew info lists options:

$ brew info tesseract
tesseract: stable 3.02.02, HEAD
http://code.google.com/p/tesseract-ocr/
Not installed
From: https://github.com/Homebrew/homebrew/commits/master/Library/Formula/tesseract.rb
==> Dependencies
Required: libtiff, leptonica
==> Options
--all-languages
    Install recognition data for all languages
--HEAD
    install HEAD version

Like the edit to the question says, if you have already installed a package and want to install the package with different options, you have to uninstall it first.

7

As of 2 February 2019, Homebrew no longer supports options link.

So you would need to edit the install file.

brew edit tesseract

(Hopefully someone finds an easier way to accomplish this behavior. But, for now, it seems like is gone for the time being.)

4

brew options <program_package> will list all the available options to flag with the install & yes, as far as I know if you want to install with any options posthumously then you'll first need to uninstall. If you don't remember the installation "formula" you used, then, use brew info <program_package> prior to uninstalling. info will also inform you of any dependencies, but brew uninstall <program_package> will tell you the specific command to force the removal of dependencies if there are any. Lastly, prior to re-installing with brew install <program_package> <--options> it's a good idea to run brew update twice and brew doctor twice... brew prune, brew cleanup & brew missing are also not a terrible idea to run before or after install/re-installs.

3

yes, you have to uninstall, then:

brew edit tesseract to change your config options and args in the tesseract.rb file which may be located here:

/usr/local/Homebrew/Library/Taps/homebrew/homebrew-core/Formula/

the other responders don't really answer your question …

  • to anyone who just came here.. this post really contains the actual answer! :) – ufk Jun 7 '18 at 7:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .