【问题标题】:Installing janus-gateway error on CentOS7CentOS7安装janus-gateway报错
【发布时间】:2019-09-23 14:07:18
【问题描述】:

我想在 CentOS7 上安装 janus-gateway。 我阅读了以下文档并尝试安装。 https://github.com/meetecho/janus-gateway/blob/master/README.md

git clone https://github.com/meetecho/janus-gateway.git
cd janus-gateway
sh autogen.sh
./configure --prefix=/opt/janus

但是,配置 janus-gateway 会导致错误。错误如下。

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... /bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for JANUS... no
configure: error: Package requirements (
                    glib-2.0 >= 2.34
                                        libconfig
                    nice
                    jansson >= 2.5
                    libssl >= 1.0.1
                    libcrypto
                  ) were not met:

No package 'nice' found

Consider 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.

我通过以下方式安装了libnice(libnice-0.1.3-4.el7.x86_64)。

yum install libnice

我该如何解决? 谢谢。

【问题讨论】:

    标签: webrtc centos7 janus janus-gateway


    【解决方案1】:

    试试这个并重建

    echo "export PKG_CONFIG_PATH=/usr/lib/pkgconfig" >> ~/.bashrc
    source ~/.bashrc
    

    【讨论】:

      【解决方案2】:

      免责声明:我在测试时使用的是 Ubuntu 18.04。

      如果您使用的是 Ubuntu 系统并尝试安装 Janus 并运行此代码
      ./configure --prefix=/opt/janus

      然后得到这个错误:No package 'nice' found

      确保你已经从 aptitude 安装了 nice。

      sudo install aptitude
      aptitude install libmicrohttpd-dev libjansson-dev \
          libssl-dev libsrtp-dev libsofia-sip-ua-dev libglib2.0-dev \
          libopus-dev libogg-dev libcurl4-openssl-dev liblua5.3-dev \
          libconfig-dev pkg-config gengetopt libtool automake
      

      由于某种原因,使用 Frank、Ahmet 或 Zallfire 的答案安装 nice 在 Ubuntu 中不起作用。它必须使用 aptitude 安装。

      【讨论】:

      • 问题表明操作系统是 CentOS7,而不是 Ubuntu,所以很明显,如果你必须安装某些东西,答案将不适用于 Ubuntu,因为 Ubuntu 使用 apt 而 CentOS 使用 yum (谷歌“什么是包管理器”)。所以基本上,你在这里回答了一个不同的问题。您不应该这样做,但我不会标记此答案,因为它可能对遇到此问题并使用 Debian 风格系统的人有所帮助。
      • 嗨 toydarian,我无法为那些在 Ubuntu 上运行的人找到类似的问题,这是我能用谷歌搜索的最接近的问题。下次我应该创建一个新问题而不是在这里添加吗?
      • 不,我想这对其他一些未来的 Ubuntu 用户会有所帮助,所以没关系。你只是听起来很困惑,其他答案对你不起作用,所以我添加了一个解释。顺便提一句。你不需要安装aptitude,你可以使用apt install ...
      【解决方案3】:

      您应该下载 libnice 源代码进行安装。 https://gitlab.freedesktop.org/libnice/libnice

      【讨论】:

        【解决方案4】:

        您需要开发库。

        yum install libnice-devel
        

        【讨论】:

          猜你喜欢
          • 2017-09-19
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          • 2015-07-22
          • 1970-01-01
          • 1970-01-01
          • 1970-01-01
          相关资源
          最近更新 更多