在Macos中安装Ubuntu等效库,例如libssl-dev [英] Install Ubuntu equivalent libraries in Macos e.g libssl-dev

查看:1624
本文介绍了在Macos中安装Ubuntu等效库,例如libssl-dev的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想在macOS中安装下面列出的ubuntu库.请问有人知道macOS终端中的等效命令是什么吗?我已经搜索过自制软件,而且在那里不存在.

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.

推荐答案

  • 在macOS上,它不等同于build-essential,因为已经安装了这些基本工具.
  • libssl-dev 是OpenSSL:brew install openssl
  • libnet-ssleay-perllibcrypt-ssleay-perl只是Perl模块 Crypt::SSLeay .您应该可以使用cpan安装它们.
  • libidn11-dev可以与brew install libidn一起安装. Debian软件包安装1.29版,而Homebrew安装1.33版.
    • 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.
    • 对于更通用的方法,您可以尝试将Debian软件包名称转换"为Homebrew:

      For a more generic approach, here is what you can try to "convert" a Debian package name into a Homebrew one:

      1. 剥离任何-dev后缀,并brew search作为结果名称;例如libidn11-dev-> brew search libidn11.
      2. 尝试不带任何后缀:brew search libidn.如果找到匹配项,请运行brew info <formula>来检查其版本.注意Homebrew有时具有固定版本的软件包,例如openssl 1.1版的openssl@1.1.
      3. packages.debian.org 上搜索软件包,以查看其安装内容.例如, libssl-dev的描述说:

      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:

      此软件包是OpenSSL项目实施的SSL和TLS加密协议的一部分,用于通过Internet进行安全通信.

      This package is part of the OpenSSL project's implementation of the SSL and TLS cryptographic protocols for secure communication over the Internet.

      然后我们可以brew search openssl查看是否有与此完全匹配的软件包.

      We can then brew search openssl to see there’s a package that matches this exactly.

      这篇关于在Macos中安装Ubuntu等效库,例如libssl-dev的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆