Could not open library '/usr/local/lib/vips.42' incompatible architecture (have 'arm64', need 'x86_64')
hidr0 opened this issue · 2 comments
hidr0 commented
Hello, I am getting this error on a MacBook Pro 14 M1 Pro
LoadError:
Could not open library '/usr/local/lib/vips.42': dlopen(/usr/local/lib/vips.42, 0x0005): tried: '/usr/local/lib/vips.42' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/lib/vips.42' (no such file).
Could not open library '/opt/homebrew/lib/libvips.42.dylib': dlopen(/opt/homebrew/lib/libvips.42.dylib, 0x0005): tried: '/opt/homebrew/lib/libvips.42.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libvips.42.dylib' (no such file), '/usr/lib/libvips.42.dylib' (no such file), '/opt/homebrew/Cellar/vips/8.12.2_1/lib/libvips.42.dylib' (mach-o file, but is an incompatible architecture (have 'arm64', need 'x86_64')), '/usr/local/lib/libvips.42.dylib' (no such file), '/usr/lib/libvips.42.dylib' (no such file)
> which vips
/opt/homebrew/bin/vips
> vips -v
vips-8.12.2-Tue Jan 25 09:34:32 UTC 2022
> gem list ffi ruby-vips
*** LOCAL GEMS ***
ffi (1.15.5, 1.15.4)
public_suffix (4.0.6)
*** LOCAL GEMS ***
ruby-vips (2.1.4)
jcupitt commented
Sorry @hidr0, I missed this.
It sounds like your process is running in the x86 emulator on the macbook, but you've built your libvips as arm64.
You need to either run in native mode (so the arm64 binary will work), or make a x86 libvips binary. Or maybe build a universal binary.
hidr0 commented
Deleted my old x86 brew. Installed new arm brew.
Deleted and reinstalled all brew packages.
Everything works now.
The problem was that I restored a Intel Time machine on M1