I would like to install ubuntu libraries listed below in macos. Please does anyone know what the equivalent commands in macos terminal are? I have searched homebrew already and they don't exist there.
apt-get install -y build-essential libssl-dev libnet-ssleay-perl libcrypt-ssleay-perl libidn11-dev
Any pointers in the right direction will be highly appreciated.
- There’s no equivalent to
build-essential
on macOS because those basic tools are already installed.
libssl-dev
is OpenSSL: brew install openssl
libnet-ssleay-perl
and libcrypt-ssleay-perl
are just Perl modules Net::SSLeay
and Crypt::SSLeay
. You should be able to install them with cpan
.
libidn11-dev
can be installed with brew install libidn
. The Debian package installs version 1.29 while Homebrew installs 1.33.
For a more generic approach, here is what you can try to "convert" a Debian package name into a Homebrew one:
- Strip any
-dev
suffix and brew search
the resulting name; e.g. libidn11-dev
-> brew search libidn11
.
- Try without any version suffix:
brew search libidn
. If you find a match, run brew info <formula>
to check its version. Note Homebrew sometimes has fixed-version packages, like openssl@1.1
for openssl
version 1.1.
Search the package on packages.debian.org to see what it installs. For example, libssl-dev
’s description says:
This package is part of the OpenSSL project's implementation of the SSL and TLS cryptographic protocols for secure communication over the Internet.
We can then brew search openssl
to see there’s a package that matches this exactly.