-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Could not open library 'vips.42' #371
Comments
I'll have a go on my mac mini tomorrow. |
Hi again, I tried here and it all seems to work for me. Looking at your log, I think you have several rubys installed and they are all mixed up:
I don't know what 2.7.3 is doing here. macOS ships with 2.6.10, so maybe this is a very old homebrew version? Homebrew is currently on 3.2.2. You say you're trying to use ruby 3.0.2, but that's another version again. I'd pick a ruby and make sure you have the matching version of gem. Check your environment variables, and especially check I see:
|
Hey John thank you so much for taking the time to write up and explain; I’m not a Ruby developer although I do use Jekyll for a lot of projects, and honestly the gem environment is a bit alien to me.
Since writing up the issue I’ve made some updates and managed to make it all work; it indeed involved wiping out all of the gems, installing “rbenv”, reinstalling Ruby (using 3.0.2 now) and then reinstalling all gems, rehashing and who knows what else! I’ve prompted ChatGPT to help me out and a lot of the advice it gave was very helpful.
Here’s what I get running the same commands:
➜ ~ which ruby
/Users/gschiavon/.rbenv/shims/ruby
➜ ~ which gem
/Users/gschiavon/.rbenv/shims/gem
➜ ~ ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin22]
➜ ~ gem info ruby-vips
*** LOCAL GEMS ***
ruby-vips (2.0.17)
Author: John Cupitt
Homepage: http://github.com/libvips/ruby-vips
License: MIT
Installed at: /Users/gschiavon/.rbenv/versions/3.0.2/lib/ruby/gems/3.0.0
Ruby extension for the vips image processing library.
➜ ~ which vips
/opt/homebrew/bin/vips
➜ ~ vips -v
vips-8.14.5
And echoing the path: /Users/gschiavon/.gem/ruby/3.0.0/bin:/opt/homebrew/opt/ruby/bin:/Users/gschiavon/.rbenv/shims:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/local/bin:/System/Cryptexes/App/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin:/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin
I confess I’m a bit scared to make any changes now that all is back working but I’m open to your comments and recommendations!
Best regards,
Gus
… On 26 Sep 2023, at 07:14, John Cupitt ***@***.***> wrote:
Hi again, I tried here and it all seems to work for me.
Looking at your log, I think you have several rubys installed and they are all mixed up:
$ bundle exec jekyll s -l
bundler: failed to load command: jekyll (/Users/gschiavon/.gem/ruby/2.7.3/bin/jekyll)
/Users/gschiavon/.gem/ruby/2.7.3/gems/ffi-1.16.1/lib/ffi/dynamic_library.rb:65:in ...
I don't know what 2.7.3 is doing here. macOS ships with 2.6.10, so maybe this is a very old homebrew version? Homebrew is currently on 3.2.2. You say you're trying to use ruby 3.0.2, but that's another version again.
I'd pick a ruby and make sure you have the matching version of gem. Check your environment variables, and especially check PATH. Wipe your .gem directory and reinstall everything. Check gem show ruby-vips and make sure it looks sensible.
I see:
***@***.*** ~ $ which irb
/opt/homebrew/Cellar/ruby/3.2.2_1/bin/irb
***@***.*** ~ $ which ruby
/opt/homebrew/Cellar/ruby/3.2.2_1/bin/ruby
***@***.*** ~ $ which gem
/opt/homebrew/Cellar/ruby/3.2.2_1/bin/gem
***@***.*** ~ $ ruby --version
ruby 3.2.2 (2023-03-30 revision e51014f9c0) [arm64-darwin22]
***@***.*** ~ $ gem info ruby-vips
*** LOCAL GEMS ***
ruby-vips (2.1.4)
Author: John Cupitt
Homepage: http://github.com/libvips/ruby-vips
License: MIT
Installed at: /opt/homebrew/lib/ruby/gems/3.2.0
A fast image processing library with low memory needs
***@***.*** ~ $ which vips
/opt/homebrew/bin/vips
***@***.*** ~ $ vips --version
vips-8.14.5
***@***.*** ~ $ irb
irb(main):001:0> require "vips"
=> true
irb(main):002:0>
—
Reply to this email directly, view it on GitHub <#371 (comment)>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/ANO4KHZFQPEPW5MWB6SOMDLX4KTHLANCNFSM6AAAAAA5GQIHMI>.
You are receiving this because you authored the thread.
|
Hi Gus, sure, looks reasonable. |
I also ran into this issue yesterday (likely because homebrew updated bunch of stuff) vips --version which blew up for me vips --version
dyld[5853]: Library not loaded: '/opt/homebrew/opt/hdf5/lib/libhdf5.200.dylib'
Referenced from: '/opt/homebrew/Cellar/libmatio/1.5.23/lib/libmatio.11.dylib'
Reason: tried: '/opt/homebrew/opt/hdf5/lib/libhdf5.200.dylib' (no such file), '/usr/local/lib/libhdf5.200.dylib' (no such file), '/usr/lib/libhdf5.200.dylib' (no such file), '/opt/homebrew/Cellar/hdf5/1.14.2/lib/libhdf5.200.dylib' (no such file), '/usr/local/lib/libhdf5.200.dylib' (no such file), '/usr/lib/libhdf5.200.dylib' (no such file)
[1] 5853 abort vips --version was very helpful, because I was able to take the ruby out of the issue chain I removed hdf5 brew uninstall hdf5
Error: Refusing to uninstall /opt/homebrew/Cellar/hdf5/1.14.2
because it is required by libmatio and vips, which are currently installed.
You can override this and force removal with:
brew uninstall --ignore-dependencies hdf5 which at forst refused, but
was almost there, but complained some errors vips --version
(process:6825): VIPS-WARNING **: 22:55:08.731: unable to load "/opt/homebrew/Cellar/vips/8.14.5/lib/vips-modules-8.14/vips-openslide.so" -- dlopen(/opt/homebrew/Cellar/vips/8.14.5/lib/vips-modules-8.14/vips-openslide.so, 0x0009): Library not loaded: '/opt/homebrew/opt/libtiff/lib/libtiff.5.dylib'
Referenced from: '/opt/homebrew/Cellar/openslide/3.4.1_7/lib/libopenslide.0.dylib'
Reason: tried: '/opt/homebrew/opt/libtiff/lib/libtiff.5.dylib' (no such file), '/usr/local/lib/libtiff.5.dylib' (no such file), '/usr/lib/libtiff.5.dylib' (no such file), '/opt/homebrew/Cellar/libtiff/4.6.0/lib/libtiff.5.dylib' (no such file), '/usr/local/lib/libtiff.5.dylib' (no such file), '/usr/lib/libtiff.5.dylib' (no such file)
vips-8.14.5 making some other guesses brew install openslide and got rid of the error
So likely some dependency chain issue from homebrew 🤷 |
So glad I came across this. Thanks for sharing how you fixed it! Worked for me as well |
@villu164's is the correct solution imo, but if for whatever reason you can't update
and lets say in your
|
Everything was running smoothly until... I ran into this error when running the
brew upgrade vips
command:From what I understand there is a misconfigured path to the library
vips.42
but upon checking the folder, it indeed doesn't exist.Which VIPS
/opt/homebrew/bin/vips
Ruby -v
ruby 3.0.2p107 (2021-07-07 revision 0db68f0233) [arm64-darwin20]
System
MacBookPro M1
OSX Ventura 13.4
I can provide more config info as required. 🙏 someone can help!
The text was updated successfully, but these errors were encountered: