问题
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.
回答1:
- There’s no equivalent to
build-essentialon macOS because those basic tools are already installed. - libssl-dev is OpenSSL:
brew install openssl libnet-ssleay-perlandlibcrypt-ssleay-perlare just Perl modules Net::SSLeay and Crypt::SSLeay. You should be able to install them withcpan.libidn11-devcan be installed withbrew 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
-devsuffix andbrew searchthe resulting name; e.g.libidn11-dev->brew search libidn11. - Try without any version suffix:
brew search libidn. If you find a match, runbrew info <formula>to check its version. Note Homebrew sometimes has fixed-version packages, likeopenssl@1.1foropensslversion 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 opensslto see there’s a package that matches this exactly.
来源:https://stackoverflow.com/questions/46112953/install-ubuntu-equivalent-libraries-in-macos-e-g-libssl-dev