在Macos中安装Ubuntu等效库,例如libssl-dev [英] Install Ubuntu equivalent libraries in Macos e.g 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-perl
和libcrypt-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
andlibcrypt-ssleay-perl
are just Perl modulesNet::SSLeay
andCrypt::SSLeay
. You should be able to install them withcpan
.libidn11-dev
can be installed withbrew install libidn
. The Debian package installs version 1.29 while Homebrew installs 1.33.- 剥离任何
-dev
后缀,并brew search
作为结果名称;例如libidn11-dev
->brew search libidn11
. - 尝试不带任何后缀:
brew search libidn
.如果找到匹配项,请运行brew info <formula>
来检查其版本.注意Homebrew有时具有固定版本的软件包,例如openssl
1.1版的openssl@1.1
. -
在 packages.debian.org 上搜索软件包,以查看其安装内容.例如,
libssl-dev
的描述说: - Strip any
-dev
suffix andbrew search
the 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.1
foropenssl
version 1.1. Search the package on packages.debian.org to see what it installs. For example,
libssl-dev
’s description says:
对于更通用的方法,您可以尝试将Debian软件包名称转换"为Homebrew:
For a more generic approach, here is what you can try to "convert" a Debian package name into a Homebrew one:
此软件包是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屋!