luckyframework / lucky

A full-featured Crystal web framework that catches bugs for you, runs incredibly fast, and helps you write code that lasts.
https://luckyframework.org
MIT License
2.57k stars 156 forks source link

libpcre.so.1: cannot open shared object file: No such file or directory #1775

Closed sergiotapia closed 1 year ago

sergiotapia commented 1 year ago

Trying to install Lucky and try it out.

I'm on Linux Mint 21 using the manual install instructions.

When I run the shards build --production command I get this error:

➜  lucky_cli git:(v1.0.0-rc1) shards build --production
Dependencies are satisfied
Building: lucky
Error target lucky failed to compile:
Showing last frame. Use --error-trace for full trace.

In lib/teeplate/src/lib/file_tree.cr:8:10

 8 | {{ run(__DIR__ + "/file_tree/macros/directory", dir.id) }}
        ^--
Error: Error executing run (exit code: 127): /home/sergio/Work/lucky_cli/lib/teeplate/src/lib/file_tree/macros/directory /home/sergio/Work/lucky_cli/src/lucky_cli/../api_authentication_app_skeleton

stderr:

    /home/sergio/.cache/crystal/home-sergio-Work-lucky_cli-lib-teeplate-src-lib-file_tree-macros-directory.cr/macro_run: error while loading shared libraries: libpcre.so.1: cannot open shared object file: No such file or directory
sergiotapia commented 1 year ago

To fix I had to uninstall Crystal that I installed with linuxbrew. Then I had to install Crystal using the deb option.

For some reason I also had to install this after:

wget http://nz2.archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2.16_amd64.deb

If you get ssl errors this fixed it for me. The core team says this is not necessary for most so don't install this unless you need it like me.