crystal-community / icr

Interactive console for Crystal programming language
MIT License
506 stars 40 forks source link

ld: library not found for -lssl (this usually means you need to install the development package for libssl) #134

Open universato opened 2 years ago

universato commented 2 years ago

Hi, what should I do to install icr? How do I install the install the development package for libssl?

$ sudo make install  
Password:
~/.asdf/shims/shards build 
Dependencies are satisfied
Building: icr
Error target icr failed to compile:
ld: library not found for -lssl (this usually means you need to install the development package for libssl)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Error: execution of command failed with code: 1: `cc "${@}" -o ~/oss/crystals/icr/bin/icr  -rdynamic -L~/.asdf/installs/crystal/1.6.1/embedded/lib -lreadline -L/usr/local/Cellar/libyaml/0.2.5/lib -lyaml -lz `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libssl || printf %s '-lssl -lcrypto'` `command -v pkg-config > /dev/null && pkg-config --libs --silence-errors libcrypto || printf %s '-lcrypto'` -lpcre -lgc -L/usr/local/Cellar/libevent/2.1.12/lib -levent -liconv`
jwoertink commented 2 years ago

Hi, this is most likely due to using asdf as your Crystal manager. I'd recommend just installing crystal directly https://crystal-lang.org/install/ for your OS.

Also, in case you're not aware, Crystal officially has a built-in REPL/Interpreter. You can build Crystal from source and compile with interpreter support, then just use crystal i to enter the REPL.

universato commented 2 years ago

Thanks!

Indeed, the error was avoided by directly installed Crystal. And, I can use crystal -i.