Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install libmagic on Mac OS X via homebrew
$ 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/
@valakirka

This comment has been minimized.

Copy link

valakirka commented Dec 29, 2013

This saved my life today, thanks Emili! : )

@djvs

This comment has been minimized.

Copy link

djvs commented Feb 11, 2014

Thanks!

@cognusion

This comment has been minimized.

Copy link

cognusion commented Aug 29, 2014

Worked like a champ, thanks for saving my sanity.

@sbonami

This comment has been minimized.

Copy link

sbonami commented Oct 25, 2014

Thanks for this!

@buru

This comment has been minimized.

Copy link

buru commented Nov 7, 2014

Thanks! It worked!

@glenegbert

This comment has been minimized.

Copy link

glenegbert commented Feb 22, 2015

Awesome. Thank you!

@apanzerj

This comment has been minimized.

Copy link

apanzerj commented Apr 15, 2015

thanks!

@digitalfinesse

This comment has been minimized.

Copy link

digitalfinesse commented Sep 6, 2015

Thank a lot!!!!!

@komalkishorvohra

This comment has been minimized.

Copy link

komalkishorvohra commented May 4, 2016

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/`

@DanielWFrancis

This comment has been minimized.

Copy link

DanielWFrancis commented Sep 14, 2018

you're great :)

@FreezzzFrank

This comment has been minimized.

Copy link

FreezzzFrank commented Nov 2, 2018

ths a lot!!

@zubairshokh

This comment has been minimized.

Copy link

zubairshokh commented Dec 21, 2018

even after installing libmagic, not able to find the file.

#include <Magick++.h>
         ^~~~~~~~~~~~
1 error generated.
make: *** [cpp/src/hash.d] Error 1
@yotamaz

This comment has been minimized.

Copy link

yotamaz commented Feb 9, 2019

Awesome. Thank you!

@abavisani

This comment has been minimized.

Copy link

abavisani commented Feb 22, 2019

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

@alfredrumss

This comment has been minimized.

Copy link

alfredrumss commented Apr 10, 2019

Awesome. Thanks for this!

@wzehui

This comment has been minimized.

Copy link

wzehui commented Apr 15, 2019

bingo! Thanks!

@samane78

This comment has been minimized.

Copy link

samane78 commented Jun 8, 2019

+1

@jdieg0

This comment has been minimized.

Copy link

jdieg0 commented Aug 7, 2019

Perfect. Thanks! brew install libmagic did it.

@amirasaran

This comment has been minimized.

Copy link

amirasaran commented Sep 29, 2019

Awesome thanks.

@tatarurzvn

This comment has been minimized.

Copy link

tatarurzvn commented Feb 28, 2020

Thank you 🌮 Saved my day

@Shellbye

This comment has been minimized.

Copy link

Shellbye commented Apr 22, 2020

Work like a charm

@sksankarraj

This comment has been minimized.

Copy link

sksankarraj commented May 24, 2020

Thanks man!

@d-kahara

This comment has been minimized.

Copy link

d-kahara commented Jun 5, 2020

Thanks!! 👍🏾

@chuaweijie

This comment has been minimized.

Copy link

chuaweijie commented Jun 21, 2020

Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.