Ramyani
Ramyani

Reputation: 1039

Crystal build fails with error - cannot find -levent

I was getting this error while trying to run a simple crystal program in my ubuntu.

/usr/bin/ld: cannot find -levent (this usually means you need to install the development package for libevent) collect2: error: ld returned 1 exit status Error: execution of command failed with code: 1: cc "${@}" -o /home/xyz/.cache/crystal/crystal-run-test.tmp -rdynamic -L/home/xyz/.asdf/installs/crystal/1.1.1/bin/../lib/crystal/lib -lpcre -lm -lgc -lpthread -levent -lrt -ldl

Upvotes: 0

Views: 285

Answers (1)

Ramyani
Ramyani

Reputation: 1039

Issue has been solved by installing libevent packages by running the following command:

sudo apt-get install libevent-dev

Upvotes: 2

Related Questions