-
-
Save eparreno/1845561 to your computer and use it in GitHub Desktop.
$ brew install libmagic | |
$ brew link libmagic (if the link is already created is going to fail, don't worry about that) | |
$ env ARCHFLAGS="-arch x86_64" gem install ruby-filemagic -- --with-magic-include=/usr/local/include --with-magic-lib=/usr/local/lib/ |
Thanks!
Worked like a champ, thanks for saving my sanity.
Thanks for this!
Thanks! It worked!
Awesome. Thank you!
thanks!
Thank a lot!!!!!
for a specific version (0.6.3)
env ARCHFLAGS="-arch x86_64" gem install -v 0.6.3 ruby-filemagic -- --with-magic-include=/usr/local/include --with-magic-lib=/usr/local/lib/`
you're great :)
ths a lot!!
even after installing libmagic, not able to find the file.
#include <Magick++.h>
^~~~~~~~~~~~
1 error generated.
make: *** [cpp/src/hash.d] Error 1
Awesome. Thank you!
what is required Mac OS version to install libmagic? I have 10.11 and received the following error when tried $ brew install libmagic:
curl: (7) Failed to connect to ftp.astron.com port 21: Connection refused
Error: An exception occurred within a child process:
DownloadError: Failed to download resource "libmagic"
Download failed: ftp://ftp.astron.com/pub/file/file-5.36.tar.gz
Awesome. Thanks for this!
bingo! Thanks!
+1
Perfect. Thanks! brew install libmagic
did it.
Awesome thanks.
Thank you 🌮 Saved my day
Work like a charm
Thanks man!
Thanks!! 👍🏾
Thank you very much!
On macOS Big Sur 11.4, I had to do the following instead of the last line above:
gem install ruby-filemagic -v '0.7.2' --source 'https://rubygems.org/' -- --with-magic-include=/opt/homebrew/include --with-magic-lib=/opt/homebrew/lib/
thanks
If folks that come here have issues with the also excellent ruby-filemagic Ruby Gem, there exists ruby-magic Ruby Gem too, which has a bit more active development.
One can install it as a pre-built (native) Ruby Gem or as usual, in which case it should use bundled libmagic (as an alternative for requiring a system-wide or external one present).
gem install ruby-filemagic -v '0.7.2' --source 'https://rubygems.org/' -- --with-magic-include=/opt/homebrew/include --with-magic-lib=/opt/homebrew/lib/
This worked for me, but did not solved the problem.
This saved my life today, thanks Emili! : )