How to install right version of libevent on OSX?
Asked Answered
S

1

7

I want to run Telegram CLI on my Macbook with latest version of OSX. It worked sometime before, but doesn't work now:

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 doesn't help. Looks like TG GLI looks for libevent 2.0.5, but 2.1.8 is installed by brew.

How can I fix it?

Seve answered 10/2, 2018 at 10:49 Comment(0)
B
0

I don't know the full answer, but constructive partial answers are allowed - and this won't fit in a comment.... downvotes aren't appreciated as I am trying to help.

A little sleuthing tells me that libevent includes a pkgconfig file at:

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

I have found with other packages (OpenCV in particular) that if you install pkgconfig it helps them find the other packages they need. So I am suggesting you do:

brew install pkg-config

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

Burgle answered 16/2, 2018 at 21:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.