大疆无人机需要推流到服务器上,使用rtmp协议推流
ubuntu16.04安装nginx1.18.0+rtmp
在安装成功之前我安装了nginx1.14.0和1.16.0都只有nginx成功,配套的rtmp模块被无法识别,换成了1.18.0版本成功推流。也许1.18.0比较顺利是因为前两版安装的时候一些错误都解决了。
所以这只是本人安装成功后的一些要点记录,没有记录全过程,不要当做完整教程!!
背景ubuntu16.04非root用户
安装依赖包
sudo apt-get update
sudo apt-get install libpcre3 libpcre3-dev
sudo apt-get install openssl libssl-dev
安装依赖包报错
1、出现版本不匹配问题
$ sudo apt-get install libpcre3 libpcre3-dev
#---------------------------------
Reading package lists... Done
Building dependency tree
Reading state information... Done
libpcre3 is already the newest version (2:8.38-3.1).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
将安装命令换成报错信息括号里的版本
$ sudo apt-get install libpcre3=1:8.31-2ubuntu2.3
#----------------------------------------------------------------------
libpcre3-dev=1:8.31-2ubuntu2.3
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libpcrecpp0
The following NEW packages will be installed:
libpcre3-dev libpcrecpp0
The following packages will be DOWNGRADED:
libpcre3
0 upgraded, 2 newly installed, 1 downgraded, 0 to remove and 9 not upgraded.
Need to get 396 kB of archives.
After this operation, 759 kB of additional disk space will be used.
Do you want