rmculpepper / iracket

Jupyter kernel for Racket
BSD 3-Clause "New" or "Revised" License
95 stars 14 forks source link

Kernel not found in Mac OS due to issue with libzmq #11

Closed pritesh-shrivastava closed 3 years ago

pritesh-shrivastava commented 4 years ago

I have both Racket and Jupyter installations running fine with even after installing zeromq with the commands given, I'm getting the following error on Mac OS Mojave :

[I 22:28:50.853 NotebookApp] Kernel started: 683b7f31-d457-4c9d-9f2b-14997b30c92e, name: racket
Kernel starting.
zmq-socket: could not find libzmq library
  error: "ffi-lib: couldn't open \"libzmq.5.dylib\" (dlopen(libzmq.5.dylib, 6): image not found)"
  context...:
   /Users/priteshshrivastava/Library/Racket/7.6/pkgs/zeromq-r-lib/main.rkt:222:0: zmq-socket
   /Applications/Racket/collects/racket/contract/private/arrow-val-first.rkt:555:3
   /Users/priteshshrivastava/Library/Racket/7.6/pkgs/iracket/private/jupyter.rkt:324:2: serve
   /Users/priteshshrivastava/Library/Racket/7.6/pkgs/iracket/private/jupyter.rkt:321:0: call-with-services
   /Users/priteshshrivastava/Library/Racket/7.6/pkgs/iracket/iracket.rkt:12:0: start-kernel
   (submod "/Users/priteshshrivastava/Library/Racket/7.6/pkgs/iracket/iracket.rkt" main): [running body]
   temp35_0
   for-loop
   run-module-instance!
emeinhardt commented 3 years ago

I'm on Catalina and experiencing the same issue. I've had Jupyter up and running (with a variety of language kernels) for months and installed Racket minutes before trying to get the current version of iRacket up and running.

CadeMichael commented 3 years ago

I have the same issue was working then randomly stopped and threw that error

doug14226 commented 3 years ago

I solved this problem by copying /usr/local/Cellar/zeromq/4.3.3/lib/libzmq.5.dylib to /Applications/Racket\ v8.1/lib/.

I installed both Racket and zeromq with homebrew on MACOS Catalina 10.15.7 The problem is Racket's search path

BTW I assume a link from /Applications/Racket\ v8.1/lib/ to /usr/local/Cellar/zeromq/4.3.3/lib/libzmq.5.dylib would work as well.

pritesh-shrivastava commented 3 years ago

I solved this problem by copying /usr/local/Cellar/zeromq/4.3.3/lib/libzmq.5.dylib to /Applications/Racket\ v8.1/lib/.

I installed both Racket and zeromq with homebrew on MACOS Catalina 10.15.7 The problem is Racket's search path

BTW I assume a link from /Applications/Racket\ v8.1/lib/ to /usr/local/Cellar/zeromq/4.3.3/lib/libzmq.5.dylib would work as well.

This solves the problem for me as well. I'm using Mac OS Mojave 10.14.6. Make sure to update the final path based on Racket version.

mpcjanssen commented 2 years ago

I am not a fan of copying files installed by a package manager to other places on the system. It clutters up your drive and can lead to issues when trying to uninstall. IMO a better approach is to chance the lib-search-dir racket uses to find dynamic libraries. This can be achieved by something like:

cat /Applications/Racket\ v8.3/etc/config.rktd
#hash(
(build-stamp . "") 
(catalogs . ("https://download.racket-lang.org/releases/8.3/catalog/" #f)) 
(doc-search-url . "https://download.racket-lang.org/releases/8.3/doc/local-redirect/index.html") 
(lib-search-dirs . (#f "/opt/homebrew/lib")))