在Mac下配置janus-gateway服务器的时候遇到了找不到`libssl`和`libcrypt

文章首发地址

在Mac下配置janus-gateway服务器的时候遇到了找不到libssllibcrypto错误,
详情如下:

./configure
...
checking for
                    glib-2.0 >= 2.34
                    libconfig
                    nice
                    jansson >= 2.5
                    libssl >= 1.0.1
                    libcrypto
                    zlib
                  ... no
configure: error: Package requirements (
                    glib-2.0 >= 2.34
                    libconfig
                    nice
                    jansson >= 2.5
                    libssl >= 1.0.1
                    libcrypto
                    zlib
                  ) were not met:

No package 'libssl' found
No package 'libcrypto' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix

只需要自定义PKG_CONFIG_PATH即可
在执行

./configure --prefix=/usr/local/janus PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig

之前在命令行内执行一下

export PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig

如果没有安装libffi,可以使用 Home brew安装一下就可以了。

猜你喜欢

转载自blog.51cto.com/13824996/2546611