How to install the correct version of libevent on OSX?

I want to run the Telegram CLI on my Macbook with the latest version of OSX. It worked once before, but now does not work:

dyld: Library not loaded: /usr/local/opt/libevent/lib/libevent-2.0.5.dylib Referenced from: /Users/me/tg/bin/./telegram-cli Reason: image not found 

I tried the following -

 brew unlink libevent && brew link libevent brew uninstall --ignore-dependencies libevent brew install libevent 

It does not help. It looks like TG GLI is looking for libevent 2.0.5, but 2.1.8 has brew installed.

How can i fix this?

+5
source share
1 answer

I do not know the full answer, but constructive partial answers are allowed - and this will not fit into the comment .... downvotes are not rated as I try to help.

A little tracking tells me that libevent contains the pkgconfig file at:

 /usr/local/Cellar/libevent/2.1.8/lib/pkgconfig/libevent.pc 

I found with other packages (in particular, OpenCV) that if you install pkgconfig , it helps them find the other packages they need. Therefore, I suggest you:

 brew install pkg-config 

and set its PATH to include the file for libevent mentioned above, then reinstall the Telegram package ... something may click.

0
source

Source: https://habr.com/ru/post/1275284/


All Articles