can't install using go in m1 mac
kavindalj opened this issue · comments
Kavinda L Jayarathna commented
>
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)
Doron Behar commented
I'd try:
CGO_CFLAGS="-I/opt/homebrew/Cellar/libmagic/5.44/include"
…On 22 August 2023 17:25:17 GMT+03:00, Kavinda L Jayarathna ***@***.***> wrote:
>
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/magicmime
***@***.***/magicmime.go:28:11: fatal error: 'magic.h' file not found
#include <magic.h>
^~~~~~~~~
1 error generated.
```
_Originally posted by @kavindalj in #6 (comment)
--
Reply to this email directly or view it on GitHub:
#98
You are receiving this because you are subscribed to this thread.
Message ID: ***@***.***>
Kavinda L Jayarathna commented
go install github.com/doronbehar/pistol/cmd/pistol@latest
It gets the same results too. I can't find what I did wrong
Kavinda L Jayarathna commented
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 🙂