Skip to content

M1 Mac error: libmagic.1.dylib': found architecture 'arm64', required architecture 'x86_64' #40

@hvan021

Description

@hvan021

Hi,
I am installing magicmime via pistol and encounter this error on Macbook Air M1.

libmagic 5.45 (current latest) installed via brew. Has anyone the same issue? Should I downgrade libmagic on my machine? Thanks.

`
go install github.com/doronbehar/pistol/cmd/pistol@latest  !1/14
go: downloading github.com/doronbehar/pistol v0.4.2
go: downloading github.com/doronbehar/magicmime v0.1.1-0.20211127135329-3de4ff29dc49
go: downloading github.com/adrg/xdg v0.4.0
go: downloading github.com/alexflint/go-arg v1.4.3
go: downloading github.com/alessio/shellescape v1.4.1
go: downloading github.com/sirupsen/logrus v1.9.0
go: downloading github.com/alecthomas/chroma/v2 v2.7.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/mholt/archiver/v3 v3.5.1
go: downloading github.com/nwaples/rardecode v1.1.3
go: downloading github.com/alexflint/go-scalar v1.1.0
go: downloading golang.org/x/sys v0.7.0
go: downloading github.com/andybalholm/brotli v1.0.5
go: downloading github.com/dsnet/compress v0.0.2-0.20210315054119-f66993602bf5
go: downloading github.com/golang/snappy v0.0.4
go: downloading github.com/klauspost/compress v1.16.4
go: downloading github.com/klauspost/pgzip v1.2.5
go: downloading github.com/pierrec/lz4/v4 v4.1.17
go: downloading github.com/ulikunitz/xz v0.5.11
go: downloading github.com/xi2/xz v0.0.0-20171230120015-48954b6210f8
go: downloading github.com/dlclark/regexp2 v1.9.0

github.com/doronbehar/magicmime

ld: warning: ignoring file '/opt/homebrew/Cellar/libmagic/5.45/lib/libmagic.1.dylib': found architecture 'arm64', required architecture 'x86_64'
ld: Undefined symbols:
_magic_buffer, referenced from:
__cgo_31903eabb88b_Cfunc_magic_buffer in _x002.o
_magic_close, referenced from:
__cgo_31903eabb88b_Cfunc_magic_close in _x002.o
_magic_error, referenced from:
__cgo_31903eabb88b_Cfunc_magic_error in _x002.o
_magic_file, referenced from:
__cgo_31903eabb88b_Cfunc_magic_file in _x002.o
_magic_load, referenced from:
__cgo_31903eabb88b_Cfunc_magic_load in _x002.o
_magic_open, referenced from:
__cgo_31903eabb88b_Cfunc_magic_open in _x002.o
_magic_setflags, referenced from:
__cgo_31903eabb88b_Cfunc_magic_setflags in _x002.o
_magic_version, referenced from:
__cgo_31903eabb88b_Cfunc_magic_version in _x002.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
`

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions