freedev
freedev

Reputation: 30067

Unable to install OpenVPN on macOS - configure: error: lzo enabled but missing

I'm trying to install OpenVPN on macOS High Sierra

I have cloned the github repo:

git clone https://github.com/OpenVPN/openvpn

And switched to the latest stable branch:

git checkout origin release/2.4

But when I tried to build the project (following the INSTALL instructions):

autoreconf -i -v -f
./configure 

I had this error during the configure step:

configure: error: lzo enabled but missing

Even after installing lzo dependency with macos ports, the problem persists.

Upvotes: 3

Views: 4161

Answers (3)

Ashley
Ashley

Reputation: 618

The following resolved the issue for me:

sudo apt-get install libssl-dev liblzo2-dev libpam0g-dev

I got this fix from this askubuntu.com openvpn lzo enabled but missing question.

More details: I got each of the 3 error messages shown below separately. Each one was resolved, then I got the next. All 3 are resolved with the one command line above. Basically, 3 developer packages were missing.

  • configure: error: OpenSSL version too old (resolved with libssl-dev)
  • configure: error: lzo enabled but missing (resolved with liblzo2-dev)
  • configure: error: libpam required but missing (resolved with libpam0g-dev)

Thanks to all the other answers which helped to confirm things, triangulate to the answer I felt most confident about!

Upvotes: 1

Saifur Rahman Mohsin
Saifur Rahman Mohsin

Reputation: 1011

I use a M1 MacBook Pro so freedev's answer did not work. I had to instead include the library from inside the homebrew directories so my final configure command was:

./configure LDFLAGS="-L/opt/homebrew/lib -L/opt/homebrew/opt/openssl@3/lib" CPPFLAGS="-I/opt/homebrew/include -I/opt/homebrew/opt/openssl@3/include"

Upvotes: 4

freedev
freedev

Reputation: 30067

The answer to this problem was easier than I thought...

I had just to define the env vars CFLAGS and LDFLAGS before running configure script:

export CFLAGS="-I/opt/local/include" 
export LDFLAGS="-L/opt/local/lib"

./configure
make
sudo make install

UPDATE

If you had to install lzo:

  • using brew: brew install lzo or brew link lzo in case it already exists
  • using port: sudo port install lzo

Upvotes: 7

Related Questions