Ruby Library not loaded: @rpath/libicui18n.58.dylib

433 views Asked by At

I'm running the command bundle exec rails canvas:compile_assets to install Canvas LMS on localhost. However, I get the following error

LoadError: dlopen(/Users/parzival/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/nokogiri-xmlsec-instructure-0.9.7/lib/nokogiri_ext_xmlsec.bundle, 9): Library not loaded: @rpath/libicui18n.58.dylib

Traceback:

LoadError: dlopen(/Users/parzival/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/nokogiri-xmlsec-instructure-0.9.7/lib/nokogiri_ext_xmlsec.bundle, 9): Library not loaded: @rpath/libicui18n.58.dylib
  Referenced from: /Users/parzival/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/nokogiri-xmlsec-instructure-0.9.7/lib/nokogiri_ext_xmlsec.bundle
  Reason: image not found - /Users/parzival/.rbenv/versions/2.6.7/lib/ruby/gems/2.6.0/gems/nokogiri-xmlsec-instructure-0.9.7/lib/nokogiri_ext_xmlsec.bundle

/Users/parzival/exempt/canvas/config/application.rb:38:in `<top (required)>'
/Users/parzival/exempt/canvas/Rakefile:6:in `require'
/Users/parzival/exempt/canvas/Rakefile:6:in `<top (required)>'
/Users/parzival/exempt/canvas/bin/rails:16:in `require'
/Users/parzival/exempt/canvas/bin/rails:16:in `<top (required)>'
/Users/parzival/exempt/canvas/bin/spring:20:in `require'
/Users/parzival/exempt/canvas/bin/spring:20:in `<top (required)>'
bin/rails:5:in `load'
bin/rails:5:in `<main>'
(See full trace by running task with --trace)

I tried to search for similar questions on StackOverflow but only found answers for Python/Conda Environment.

I'm using MacOS Big Sur 11.1 and Ruby 2.6.7. Node version 14.16.1 and npm version 6.14.12.

What I've Tried (Edit on April 29, 2021)

  • Reinstalling Node, PHP using Homebrew, and all other solutions specified in this GitHub post
  • Reinstalled yarn, npm, gem, bundle, rails, and all dependencies
  • Installing different versions of Node, (my system default is v16, I installed v14 for this project, also tried with v12)
  • Reinstalled the package from instructure and repeated installation process
  • Reinstalled nokogiri-xmlsec-instructure(which seems to be causing the error); tried different versions but none appeared to be compatible with other dependencies
  • run brew upgrade and many other commands to upgrade to the latest version

However, none of the above options I tried worked. The same error still persists.

As @Siguza mentioned requested in the comments, nothing returns when I run find /Users/parzival/.rbenv -name libicui18n.58.dylib. I also searched for this file on my device, but it's nowhere to be found.

Please let me know if you need any additional info - I'd be happy to provide them. Any help to fix this issue is greatly appreciated :)

0

There are 0 answers