Centos7配置webrtc-streamer環境
- 安裝webrtc-streamer0.7版本
-
- 升級gdb
-
- 1、yum安裝
- 2、查看gdb版本
- 3.下載待升級的gdb版本
- 4.QA
-
- 1、預編譯的時候報錯no acceptable C compiler found in $PATH
- 2、make的時候報錯[all-bfd] Error
- 3、make的時候報錯
- 升級GCC
-
- 1.源碼編譯升級gcc9.3.0
- 2.升級成功后gcc版本檢查
- 升級Python
- 升級make
-
- 下載make
- 編譯安裝make
- make版本檢查
- 升級binutils
-
- 下載binutils
- 編譯安裝binutils
- 升級bison
-
- 下載bison
- 編譯安裝bison
- bison版本檢查
- 升級glibc
-
- 下載glibc3.3版本
- 查看安裝glibc需要的依賴版本
- 編譯glibc
- 版本檢查
安裝webrtc-streamer0.7版本
下載安裝包
wget https://github.com/mpromonet/webrtc-streamer/releases/download/v0.7.0/webrtc-streamer-v0.7.0-Linux-x86_64-Release.tar.gz解壓
tar -zxvf webrtc-streamer-v0.7.0-Linux-x86_64-Release.tar.gz重命名
mv webrtc-streamer-v0.7.0-Linux-x86_64-Release/ webrtc-streamer/cd webrtc-streamer/執行 ./webrtc-streamer 查看缺少的依賴
缺少libX11.so.6依賴,執行 yum whatprovides libX11.so.6
查看需要安裝的版本
然后執行以下命令安裝 libX11.so.6
yum install -y libX11-1.6.7-2.el7.x86_64 --setopt=protected_multilib=false
然后再重復執行./webrtc-streamer查看還缺哪些依賴按照以上步驟安裝,直到最后出現如下情況:缺少glibc依賴
升級glibc依賴前,需要升級gdb 、gcc、python、make
升級gdb
gdb版本:升級前7.6.1,升級后7.8
1、yum安裝
yum install -y gdb
2、查看gdb版本
3.下載待升級的gdb版本
下載安裝包
wget http://ftp.gnu.org/gnu/gdb/gdb-7.8.tar.gz解壓軟件包
tar -zxvf gdb-7.8.tar.gz
預編譯,分別執行以下指令,如果出現報錯,按照QA章節處理,建議執行make之前先把QA章節的依賴先安裝一遍
cd gdb-7.8
mkdir build && cd build
../configure --prefix=/usr
make
make install
最后檢查版本
4.QA
1、預編譯的時候報錯no acceptable C compiler found in $PATH
報錯信息:configure: error: no acceptable C compiler found in $PATH
報錯原因:未安裝gcc
解決方案:yum -y install gcc-c++
2、make的時候報錯[all-bfd] Error
報錯信息:make[3]: *** [bfd.info] Error 1
報錯原因:沒有安裝texinfo模塊
解決方案:yum install -y texinfo,然后重新執行預編譯步驟
3、make的時候報錯
報錯信息:no termcap library found
報錯原因:沒有安裝termcap
解決方案:源碼安裝termcap
#下載termcap軟件包
[root@s142 opt]# wget https://ftp.gnu.org/gnu/termcap/termcap-1.3.1.tar.gz --no-check-certificate
#解壓軟件包
[root@s142 opt]# tar -zxvf termcap-1.3.1.tar.gz
#預編譯
[root@s142 termcap-1.3.1]# ./configure --prefix=/usr
#編譯
[root@s142 termcap-1.3.1]# make
#編譯安裝
[root@s142 termcap-1.3.1]# make install
————————————————
版權聲明:本文為博主原創文章,遵循 CC 4.0 BY-SA 版權協議,轉載請附上原文出處鏈接和本聲明。
原文鏈接:https://blog.csdn.net/carefree2005/article/details/125068985
升級GCC
1.源碼編譯升級gcc9.3.0
wget https://mirrors.aliyun.com/gnu/gcc/gcc-9.3.0/gcc-9.3.0.tar.gz
tar -zxf gcc-9.3.0.tar.gz
cd gcc-9.3.0/./contrib/download_prerequisites
執行后如果報錯:lbzip2: Cannot exec: No such file or directory,那就需要安裝lbzip2
執行
yum -y install bzip2
安裝完畢后再次執行
./contrib/download_prerequisites
最后再執行編譯
mkdir build && cd build
../configure --enable-checking=release --enable-language=c,c++ --disable-multilib --prefix=/usrmake
make install
2.升級成功后gcc版本檢查
gcc -v
升級Python
執行yum install python3 -y查看python版本,
python --version
發現python版本沒變,這是因為在/usr/bin中有個python軟鏈接文件仍然指向python2
刪除該文件,重新創建一個,指向python3就可以了
更改了鏈接后會導致yum命令不可用
這是因為yum包管理是使用python2.x寫的,將python2.x升級到python3.6.8以后,由于python版本語法兼容性導致問題出現
解決辦法:
修改yum配置文件,將python版本指向以前的舊版本
# vi /usr/bin/yum
#!/usr/bin/python2.7
修改urlgrabber-ext-down文件,更改python版本
# vi /usr/libexec/urlgrabber-ext-down
#!/usr/bin/python2.7
升級make
下載make
wget https://mirrors.aliyun.com/gnu/make/make-4.4.tar.gz
tar -zxvf make-4.4.tar.gz
編譯安裝make
cd make-4.4
mkdir build && cd build# 編譯安裝
../configure --prefix=/usr make make install
make版本檢查
make -v
升級binutils
下載binutils
wget https://mirrors.aliyun.com/gnu/binutils/binutils-2.30.tar.gz
tar -zxvf binutils-2.30.tar.gz
編譯安裝binutils
cd binutils-2.30
./configure --prefix=/usr
make && make install
升級bison
下載bison
wget https://mirrors.aliyun.com/gnu/bison/bison-3.0.1.tar.gz
tar -zxvf bison-3.0.1.tar.gz
編譯安裝bison
cd bison-3.0.1
./configure --prefix=/usr
make && make install
bison版本檢查
bison -V
升級glibc
下載glibc3.3版本
wget https://mirrors.aliyun.com/gnu/glibc/glibc-2.33.tar.gz
tar -zxf glibc-2.31.tar.gz
cd glibc-2.31/
查看安裝glibc需要的依賴版本
cat INSTALL | grep -E "newer|later"
如果有依賴版本不符合需重新安裝后再編譯glibc
編譯glibc
mkdir build
cd build
../configure --prefix=/usr --disable-profile --enable-add-ons --with-headers=/usr/include --with-binutils=/usr/bin --disable-sanity-checks --disable-werrormake
make install
make localedata/install-locales
最后升級完成后的頁面,會有一個error,可以忽略,如下:
版本檢查
strings /lib64/libc.so.6 | grep GLIBC
ll /lib64/libc.so*
ldd --version