Janus核心是WebRTC的“gateway”,它是用C语言实现并且是在libsrtp和libnice之上开发的,通过添加各种插件,可以实现不同的功能或用例,例如SFU。官网:https://janus.conf.meetecho.com/

在Mac下安装janus

按照
https://gist.github.com/anild...点击预览
来安装

安装流程:

brew install jansson libnice openssl libusrsctp libmicrohttpd libwebsockets cmake rabbitmq-c sofia-sip opus libogg glib pkg-config gengetopt ffmpegcurl https://codeload.github.com/cisco/libsrtp/tar.gz/v2.2.0 > libsrtp-2.2.0.tar.gz
tar xvf libsrtp-2.2.0.tar.gz
cd libsrtp-2.2.0
./configure --prefix=/usr/local --enable-openssl PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
make shared_library && sudo make installgit clone git@github.com:meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --prefix=/usr/local/janus --enable-post-processing PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig
make
sudo make install
sudo make configs

在安装编译的时候,有以下几个报错,记录以下:

1.sh autogen.sh的时候报错

autogen.sh: line 8: autoreconf: command not found

查找原因,是因为没有安装某些工具,解决方法:

brew install autoconf

继续执行sh autogen.sh,报错

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal -I m4 --output=aclocal.m4t
Can't exec "aclocal": No such file or directory at /usr/local/Cellar/autoconf/2.69/share/autoconf/Autom4te/FileUtils.pm line 326.
autoreconf: failed to run aclocal: No such file or directory

这是需要install一个automake,执行命令:

brew install automake

安装完automake以后,继续执行autogen.sh,还是有报错:

autoreconf: Entering directory `.'
autoreconf: configure.ac: not using Gettext
autoreconf: running: aclocal --force -I m4
autoreconf: configure.ac: tracing
autoreconf: configure.ac: not using Libtool
autoreconf: running: /usr/local/Cellar/autoconf/2.69/bin/autoconf --force
configure.ac:6: error: possibly undefined macro: AC_ENABLE_SHAREDIf this token and others are legitimate, please use m4_pattern_allow.See the Autoconf documentation.
configure.ac:7: error: possibly undefined macro: AC_ENABLE_STATIC
autoreconf: /usr/local/Cellar/autoconf/2.69/bin/autoconf failed with exit status: 1

看报错信息,看样子还需要安装Libtool,那就安装:

brew install Libtool

好了,继续下一步:

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

又有报错:

configure: error: cannot find install-sh, install.sh, or shtool in . "."/.

google一下,有人已经提出了:
The problem won't go away by just installing automake/autoconf/libtool. One also needs to run 'autoreconf -i' before rerunning ./configure - it will install the missing files that ./configure is complaining about.
就是说安装这些库并不能解决这个问题,还要执行一次autoreconf -i

autoreconf -i

很顺利,然后继续执行

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

出现以下一堆

checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... ./install-sh -c -d
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define __EXTENSIONS__... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking build system type... x86_64-apple-darwin17.7.0
checking host system type... x86_64-apple-darwin17.7.0
checking how to print strings... printf
checking for a sed that does not truncate output... /usr/bin/sed
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... /Library/Developer/CommandLineTools/usr/bin/ld
checking if the linker (/Library/Developer/CommandLineTools/usr/bin/ld) is GNU ld... no
checking for BSD- or MS-compatible name lister (nm)... /usr/bin/nm -B
checking the name lister (/usr/bin/nm -B) interface... BSD nm
checking whether ln -s works... yes
checking the maximum length of command line arguments... 196608
checking how to convert x86_64-apple-darwin17.7.0 file names to x86_64-apple-darwin17.7.0 format... func_convert_file_noop
checking how to convert x86_64-apple-darwin17.7.0 file names to toolchain format... func_convert_file_noop
checking for /Library/Developer/CommandLineTools/usr/bin/ld option to reload object files... -r
checking for objdump... objdump
checking how to recognize dependent libraries... pass_all
checking for dlltool... no
checking how to associate runtime and link libraries... printf %s\n
checking for ar... ar
checking for archiver @FILE support... no
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /usr/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /bin/dd
checking how to truncate binary pipes... /bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for dsymutil... dsymutil
checking for nmedit... nmedit
checking for lipo... lipo
checking for otool... otool
checking for otool64... no
checking for -single_module linker flag... yes
checking for -exported_symbols_list linker flag... yes
checking for -force_load linker flag... yes
checking for dlfcn.h... yes
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... yes
checking for gcc option to produce PIC... -fno-common -DPIC
checking if gcc PIC flag -fno-common -DPIC works... yes
checking if gcc static flag -static works... no
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (/Library/Developer/CommandLineTools/usr/bin/ld) supports shared libraries... yes
checking dynamic linker characteristics... darwin17.7.0 dyld
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... no
checking for pkg-config... /usr/local/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking forglib-2.0 >= 2.34libconfignicejansson >= 2.5libssl >= 1.0.1libcrypto... no
configure: error: Package requirements (glib-2.0 >= 2.34libconfignicejansson >= 2.5libssl >= 1.0.1libcrypto) were not met:No package 'libconfig' foundConsider adjusting the PKG_CONFIG_PATH environment variable if you
installed software in a non-standard prefix.Alternatively, you may set the environment variables JANUS_CFLAGS
and JANUS_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.

发现还是有报错的,看起来是没安装这些依赖,但是brew install的时候却提示全都安装过了,经过分析脚本发现:janus是通过pkg-config匹配依赖项,在执行pkg-config查找libconfig路径时发现错误,于是需要改变一下路径:

./configure --prefix=/usr/local/janus --enable-post-processing PKG_CONFIG_PATH=/usr/local/opt/openssl/lib/pkgconfig:/usr/local/opt/libffi/lib/pkgconfig

接下来就很顺利了,make以后,测试janus是否安装成功

./janus --version

如果成功,就会出现:

Janus commit: eb703e1a53360a7f967e4d969dec957a7249e134
Compiled on:  2019? 9? 1? ??? 11?13?03? CSTjanus 0.7.4

MAC下build Janus相关推荐

  1. .NET Core竟然无法在Mac下进行build

    KRuntime 改为 XRE 之后(详见从 KRE 到 XRE :ASP.NET 5 中正在消失的那些K),昨天在 mac 用 git 签出 XRE 的代码库,直接执行其中的 build 命令 sh ...

  2. Mac下Android配置及unity3d的导出Android

    昨晚实在弄的太晚了,费尽脑汁才弄出来. ok,关于mac下的eclipse的安卓配置,我仅仅贴一个网址,就ok了 http://developer.android.com/sdk/index.html ...

  3. caffe之mac下环境搭建

    参考 http://www.linuxidc.com/Linux/2016-09/135026.html 1. 安装brew,也叫homebrew,mac下类似于ubuntu的apt-get功能 cu ...

  4. (转)Mac下MySql安装经历(含安装错误排查、卸载多种折腾)

    在安装mysql的时候,活活折腾我两天.结果终于被我折腾成功了-- 一开始我就放了个错误:我下了32位版本的mysql:mysql-5.5.8-osx10.6-x86.dmg  须知在mac下装的是6 ...

  5. mac下编译安装grafana 4.2.0

    go语言在开发效率和运行效率中的优势让很多人青睐,所以有倾向打算转向go语言的开发. 下面介绍在Mac OS X中golang的开发环境配置. 1.安装brew brew是一个mac下的由ruby开发 ...

  6. Mac下Jekyll安装

    之前一直用Wordpress,虽然功能强大,各种插件各种bug,如果想弄个主题,折腾得要命.最近改用jekyll+gitHub免费空间.记录一下. 我用的是Mac,所以只讲述Mac下如何安装,Wind ...

  7. 在Mac下安装使用OpenCV

    教导大家如何在Mac下安装使用OpenCV, 包括使用编译器,Xcode,和Eclipse的开发方法 系统环境:ML10.7.5  cmake版本:2.8.10 XCode版本:4.5.1  Open ...

  8. MAC下《暗黑世界》客户端版本编译说明!!

    原地址:http://blog.csdn.net/uxqclm/article/details/11970659 2013-09-24 12:02 161人阅读 评论(0) 收藏 举报 目录(?)[+ ...

  9. Mac下如何查看Python的版本?

    转载自:http://www.zhengjie.info/2012/01/20/2787 Mac下如何查看Python的版本? 问题:Mac下如何查看Python的版本? 系统:Mac OS X 软件 ...

最新文章

  1. python3 获取当前路径_如何使用python3获取当前路径及os.path.dirname的使用
  2. my-innodb-heavy-4G.cnf配置文件注解
  3. PinnerSage模型
  4. Tcl学习之--表达式
  5. GARFIELD@03-26-2005
  6. [译]GLUT教程 - 笔划字体
  7. MySql数据库 - 2.启动与关闭
  8. DNS 正向查找与反向查找
  9. Unity 面试经验汇总
  10. Kindle3 字典安装
  11. (PKCS1)RSA公私钥pem文件解析
  12. bugzilla perl mysql apache windows,windows下配置bugzilla
  13. java精选视频资源,收藏慢慢看!
  14. 基于射频技术的门禁管理系统
  15. java 基础:方法/函数
  16. 【Unity3D】sRGB伽马(gamma)空间和sRGB Frame Buffer线性空间的简单介绍
  17. 【Cocos Creator 游戏开发】开发日志-前言
  18. 如何将白鹭引擎开发的游戏通过Egret Native发布到 GooglePlay平台
  19. tf data 切换数据集 使用并行提高效率
  20. 分布式消息队列RocketMQ与Kafka的18项差异之“拨乱反正”

热门文章

  1. 我的美国(北美)计算机CS实习面试经验分享
  2. 卫星定位技术(概述)
  3. 大工20春《计算机文化基础》在线测试3,大工15春《计算机文化基础》在线测试123答案辅导资料...
  4. 【10年运维整理】服务器常见故障及其解决方法
  5. 华尔街日报:苹果与高盛计划今年联合发行信用卡
  6. 有机硅液体消泡剂详细介绍
  7. [渝粤教育] 商丘师范学院 网球 参考 资料
  8. 南阳师范学院大一计算机老师,大学计算机A
  9. span标签的鼠标滑入提示_html鼠标悬停提示文字 div a span均适用
  10. python ioc框架_IOC 实现原理