doronbehar / pistol

General purpose file previewer designed for Ranger, Lf to make scope.sh redundant

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

can't install using go in m1 mac

kavindalj opened this issue · comments

          > 

I tried this on my m1 mac and didn't work for me..please anyone can help to fix this?

CGO_CFLAGS="-I/opt/homebrew/Cellar/libmagic/5.44/include/magic.h" go install github.com/doronbehar/pistol/cmd/pistol@latest
# github.com/doronbehar/magicmime
go/pkg/mod/github.com/doronbehar/magicmime@v0.1.1-0.20211127135329-3de4ff29dc49/magicmime.go:28:11: fatal error: 'magic.h' file not found
 #include <magic.h>
          ^~~~~~~~~
1 error generated.

Originally posted by @kavindalj in #6 (comment)

go install github.com/doronbehar/pistol/cmd/pistol@latest

It gets the same results too. I can't find what I did wrong

CGO_CFLAGS="-I/opt/homebrew/Cellar/libmagic/5.45/include" CGO_LDFLAGS="-L/opt/homebrew/Cellar/libmagic/5.45/lib" go install github.com/doronbehar/pistol/cmd/pistol@latest
I uninstalled everything and installed using this command. it's working now 🙂