安装licode 失败期间碰到各种各样问题,建议在纯净的环境下安装,要不然总是碰到这种各样的问题,最后两次尝试在纯净的ubuntu 14.04 和Mac(不清楚版本)安装都成功了,并且问题较少,下面写一下安装中记录的一部分问题:
遇到问题:
sudo chown -R hostname(自己的主机名) /usr/local/ 没有权限
解决办法:
Mac系统root用户没有权限修改/usr/bin目录,解决办法:重启Mac,按住command+R,进入recovery模式,打开Utilities下的终端,输入:csrutil disable 并回车,输入reboot 并回车重启。
打开终端输入sudo chown -R hostname(自己的主机名) /usr/local/ 回车
安装homebrew
打开终端输入:
ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
克隆Licode
1、 git clone https://github.com/lynckia/licode.git
cd licode
安装依赖
Ubuntu:
2、 ./script/installUbuntuDeps.sh
Mac:
2、 ./script/installMacDeps.sh
遇到问题:
Install homebrew...[press enter]然后没反应
解决办法:
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
安装Licode
3、 ./script/installNuve.sh
遇到问题: 没有权限,sudo也不行
解决办法: for i in find . -iname *.sh; do sudo chmod +x $i; done;
遇到问题: licode/erizo/src/erizo/media/codecs/VideoCodec.cpp:57:18: error:‘AVCodecContext::rc_buffer_aggressivity’is deprecated [-Werror=deprecated-declarations]
解决办法: 在licode/erizo/src/erizo/media/codecs/VideoCodec.h添加一行 #pragma GCC diagnostic ignored "-Wdeprecated-declarations" 在licode/erizo/src/erizo/media/codecs/AudioCodec.h添加一行 #define __STDC_CONSTANT_MACRO ./script/installErizo.sh
遇到问题:
CMake Error at /usr/share/cmake-2.8/Modules/FindBoost.cmake:1131 (message):
Unable to find the requested Boost libraries.
Boost version: 1.65.1
Boost include path: /usr/local/include
Could not find the following Boost libraries:
boost_system
解决办法:
依次执行:
wget https://dl.bintray.com/boostorg/release/1.65.1/source/boost_1_65_1.tar.gz
tar -zxvf boost_1_65_1.tar.gz
cd boost_1_65_1
安装所有库(./bootstrap.sh --with-libraries=all) 只安装指定库(./bootstrap.sh --with-libraries=libname)
./b2
./b2 install
遇到问题:
Linking CXX shared library liberizo.so
/usr/bin/ld: /usr/local/lib/libboost_thread.a(thread.o): relocation R_X86_64_32 against `__pthread_key_create' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libboost_thread.a: error adding symbols: Bad value
collect2: error: ld returned 1 exit status
解决办法:`
4、 ./installNuve.sh: line 47:
遇到问题: /Users/mahao/workspace/licode/scripts/././mongo: cannot execute binary file
解决办法: brew install rabbitmq mongodb
遇到问题: 连接mongo 失败 解决办法:
遇到问题:
一系列的关于boost的file not found问题
解决办法:
sudo vim /etc/profile 写入 export CPLUS_INCLUDE_PATH=$CPLUS_INCLUDE_PATH:/usr/local/include/ 执行 source /etc/profile
遇到问题:
CMake Error at CMakeLists.txt:7 (message):
lib not found: SRTP-NOTFOUND check README
Call Stack (most recent call first):
CMakeLists.txt:77 (test_lib)
-- Configuring incomplete, errors occurred!
See also "/Users/zexu/github/licode/erizo/build/release/CMakeFiles/CMakeOutput.log".
解决办法:
rm -rf licode/build/libdeps
./installMacDeps.sh