Search code examples
crystal-lang

App compilations in centos crystal obtain error


I have the following code:

require "kemal"



get "/" do
  "Hello Kemal!"
end

Kemal.run

But when I'm going to launch the application in centos it tells me the following:

crystal run app

/usr/bin/ld: it can not be found -lz
/usr/bin/ld: it can not be found -lssl
/usr/bin/ld: it can not be found-lcrypto
/usr/bin/ld: it can not be found-lcrypto
collect2: error: ld returned the exit statusa 1
Error: execution of command failed with code: 1: `cc "${@}" -o '/root/.cache/crystal/crystal-run-aplicacion.tmp'  -rdynamic  -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 -lm /usr/bin/../lib/crystal/lib/libgc.a -lpthread /usr/share/crystal/src/ext/libcrystal.a -levent -lrt -ldl -L/usr/bin/../lib/crystal/lib -L/usr/lib -L/usr/local/lib`

someone knows what happens


Solution

  • You have missing the some libraries. Read this articles:

    How did you install Crystal?