Install Ubuntu equivalent libraries in Macos e.g libssl-dev

耗尽温柔 提交于 2019-12-13 09:52:06

问题


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-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:

  1. Strip any -dev suffix and brew search the resulting name; e.g. libidn11-dev -> brew search libidn11.
  2. 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.
  3. 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.



来源:https://stackoverflow.com/questions/46112953/install-ubuntu-equivalent-libraries-in-macos-e-g-libssl-dev

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!