Skip to content
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

Update README to tell about zmq installation as the requirement #348

Open
dpetruha opened this issue Jul 31, 2024 · 1 comment
Open

Update README to tell about zmq installation as the requirement #348

dpetruha opened this issue Jul 31, 2024 · 1 comment

Comments

@dpetruha
Copy link

Hello!
I tried to install iruby to my local env (running MacOS) and was getting the error below.
As appeared I had to install zmq first before installing iruby.
Update README document to include zmq installation in Requirements section.

gem install iruby
Building native extensions. This could take a while...
ERROR:  Error installing iruby:
	ERROR: Failed to build gem native extension.

    current directory: /Users/dpetruha/.gem/ruby/3.1.2/gems/iruby-0.8.0/ext
/Users/dpetruha/.rubies/ruby-3.1.2/bin/ruby -rrubygems /Users/dpetruha/.gem/ruby/3.1.2/gems/rake-13.2.1/exe/rake RUBYARCHDIR\=/Users/dpetruha/.gem/ruby/3.1.2/extensions/arm64-darwin-21/3.1.0/iruby-0.8.0 RUBYLIBDIR\=/Users/dpetruha/.gem/ruby/3.1.2/extensions/arm64-darwin-21/3.1.0/iruby-0.8.0
Unable to load this gem. The libzmq library (or DLL) could not be found.
If this is a Windows platform, make sure libzmq.dll is on the PATH.
If the DLL was built with mingw, make sure the other two dependent DLLs,
libgcc_s_sjlj-1.dll and libstdc++6.dll, are also on the PATH.
For non-Windows platforms, make sure libzmq is located in this search path:
["/Users/dpetruha/.gem/ruby/3.1.2/gems/ffi-rzmq-core-1.0.7/lib/ffi-rzmq-core/../../ext/libzmq.dylib", "/usr/local/opt/mysql-client/bin/libzmq.dylib", "/Users/dpetruha/.gem/ruby/3.1.2/bin/libzmq.dylib", "/Users/dpetruha/.rubies/ruby-3.1.2/lib/ruby/gems/3.1.0/bin/libzmq.dylib", "/Users/dpetruha/.rubies/ruby-3.1.2/bin/libzmq.dylib", "/Applications/IntelliJ IDEA 2024.2 EAP.app/Contents/MacOS/libzmq.dylib", "/usr/local/opt/mysql-client/bin/libzmq.dylib", "/opt/homebrew/anaconda3/bin/libzmq.dylib", "/opt/homebrew/anaconda3/condabin/libzmq.dylib", "/usr/local/opt/mysql-client/bin/libzmq.dylib", "/Users/dpetruha/.nvm/versions/node/v20.15.0/bin/libzmq.dylib", "/opt/homebrew/bin/libzmq.dylib", "/opt/homebrew/sbin/libzmq.dylib", "/usr/local/bin/libzmq.dylib", "/System/Cryptexes/App/usr/bin/libzmq.dylib", "/usr/bin/libzmq.dylib", "/bin/libzmq.dylib", "/usr/sbin/libzmq.dylib", "/sbin/libzmq.dylib", "/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/local/bin/libzmq.dylib", "/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/bin/libzmq.dylib", "/var/run/com.apple.security.cryptexd/codex.system/bootstrap/usr/appleinternal/bin/libzmq.dylib", "/Library/Apple/usr/bin/libzmq.dylib", "/Applications/iTerm.app/Contents/Resources/utilities/libzmq.dylib", "/Users/dpetruha/.rubies/ruby-3.1.2/lib/libzmq.dylib", "/usr/local/lib/libzmq.dylib", "/opt/local/lib/libzmq.dylib", "/opt/homebrew/lib/libzmq.dylib", "/usr/lib64/libzmq.dylib"]
rake aborted!
Failed to install ZeroMQ
@kojix2
Copy link
Member

kojix2 commented Aug 1, 2024

Hi @dpetruha,

Thank you for your message.

The README.md file around version v0.7.3 had this explanation.
From version v0.7.4, we added the native-package-installer.
This automatically installs the required zeromq libraries for each platform when you install the iruby gem.

iruby/ext/Rakefile

Lines 10 to 15 in fe16c1b

unless NativePackageInstaller.install(arch_linux: 'zeromq',
debian: 'libzmq3-dev',
freebsd: 'libzmq4',
homebrew: 'zmq',
macports: 'zmq',
redhat: 'zeromq-devel')

On macOS, the zmq package is expected to be installed automatically by Homebrew. However, this may not work in some cases. The last update was made three years ago, so it might not work well now. Please let me know your OS version. If you have any ideas for a pull request, please send them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants