歡迎來到Linux教程網
Linux教程網
Linux教程網
Linux教程網
Linux教程網 >> Linux基礎 >> Linux教程 >> Fedora 8下以源碼編譯方式安裝linphone

Fedora 8下以源碼編譯方式安裝linphone

日期:2017/2/28 16:59:19   编辑:Linux教程

由於linphone依賴了太多的庫,安裝的時候要多注意一些。
在以源碼形式安裝軟件的時候,./configure腳本如果沒有顯式指定安裝路徑(--prefix=),則默認安裝到/usr/local目錄下。

這將給後面一些包的安裝帶來困擾,因為後面包的安裝,要用到前面安裝的包的頭文件和庫文件,如果這時候沒有在./configure腳本中指定它所依賴的頭文件和庫文件位置(--with-FEATURE=),則它默認在/usr/include和/usr/lib目錄下找,當然找不到了,編譯就會出現錯誤。

所以安裝的時候,最好把./configure --help中的參數看一看,指定安裝在/usr下,可以省去很多麻煩。

注意:安裝在/usr下,會把系統中原有的舊的庫文件頭文件替換掉,如果你還想使用它們,還是安裝在/usr/local目錄下。

1.安裝speex

[root@localhost atom]# rpm -qa | grep speex
speex-1.2-0.3.beta2

沒有devel包,必須安裝speex-1.2beta3.tar.gz
./configure --prefix=/usr
make
make install

2.安裝libosip2-3.1.0.tar.gz
./configure --prefix=/usr
make
make install

3.安裝libeXosip2-3.1.0.tar.gz
./configure --prefix=/usr
make
make install

4.安裝readline
[root@localhost atom]# rpm -qa | grep readline
readline-devel-5.2-7.fc8
readline-5.2-7.fc8
已經有了,不必安裝

5.安裝alsa-lib
[root@localhost atom]# rpm -qa | grep alsa-lib
alsa-lib-devel-1.0.15-1.fc8
alsa-lib-1.0.15-1.fc8
已經有了,不必安裝

6.安裝SDL
[root@localhost atom]#rpm -qa | grep SDL
SDL-1.2.12-2.fc8
SDL-devel-1.2.12-2.fc8
已經有了,不必安裝

安裝ffmpeg。
慚愧,ffmpeg是什麼我還搞得不是很清楚,決定去做做功課。還有linux下的一堆視頻處理庫。
要讓ffmpeg發揮的功能越大,你需要安裝的多媒體庫就要越多。這裡怕麻煩,我只選取了lame ogg xvid faad2安裝。

7.安裝lame-398.tar.gz 傳說中的神器:)
./configure --prefix=/usr
make
make install

8.安裝libogg-1.1.3
./configure --prefix=/usr
make
make install

9.安裝faad2-2.6.1.tar.gz
./bootstrap
./configure --prefix=/usr
make
make install

10.安裝xvidcore-1.1.3.tar.gz
cd ${xvidcore}/build/generic
./configure --prefix=/usr
make
make install

11.安裝ffmpeg
ffmpeg現在只能通過svn方式獲得
svn checkout svn://svn/mplayerhq.hu/ffmpeg/trunk ffmpeg
當前目錄會自動出現一個ffmpeg的目錄,耐心等它下載完。我下的大小差不多32MB
./configure --prefix=/usr --enable-gpl --enable-shared --enable-libmp3lame --enable-libxvid --enable-libfaad --enable-libfaadbin --enable-swscale --enable-pthreads
--enable-swscale一定要,後面編譯mediastreamer2要用到

make
make install

12.安裝gtk
[root@localhost atom]# rpm -qa | grep gtk2-devel
gtk2-devel-2.12.1-5.fc8


13.安裝libtheora-1.0beta3.tar.gz
./configure --prefix=/usr
make
make install

14.安裝linphone-2.1.1.tar.gz
linphone源碼包裡已經帶有oRTP和mediastreamer2,可以將它們整體編譯,但是最好還是先分別進入oRTP和mediastreamer2文件夾各自編譯。

安裝oRTP
./configure --prefix=/usr
make
make install

安裝mediastreamer2
./configure --prefix=/usr --enable-alsa --enable-video --with-ffmpeg=/usr --with-sdl=/usr --enable-shared
make
make install

注意make的時候會出錯,由於找不到頭文件。
在/usr/include下新建ffmpeg文件夾,把avcodec.h swscale.h avutil.h復制進去
[root@localhost include]# mkdir ffmpeg
[root@localhost include]# cp libavcodec/avcodec.h ffmpeg
[root@localhost include]# cp libswscale/swscale.h ffmpeg
[root@localhost include]# cp libavutil/avutil.h ffmpeg/
我也不想用這麼土的方法。 我也試過在編譯ffmpeg的時候指定生成頭文件的目錄,但是這樣做會導致一個動態庫鏈接不過去,真奇怪。
ffmpeg在/usr/include下生成的文件夾是libavcodec libavdevice libavformat libavutil libswscale
做個記號,以防日後查找需要

安裝linphone
./configure --prefix=/usr --enable-alsa --enable-video --with-osip=/usr --with-readline=/usr --with-ffmpeg=/usr --with-sdl=/usr
make
make install

完畢

15.測試通信

在windows下安裝linphone-win32-0.5.2-setup.exe,這是個超級弱的版本。不能chat,但是可以視頻。
tools -> settings -> sip settings -> add proxy
在your中填入 sip:[email protected]
sip和@之間的用戶名隨便填,反正這個是在局域網中,@後面填上自己的IP地址,它都不會送到DNS去解析。

插入攝像頭,開始呼叫linux下的linphone sip:[email protected]

可以聊天了。

附:
不管是Ubuntu還是Fedora,默認都裝有一個Ekiga,這就是之前叫Gnome meeting的東西。
它也是一款soft phone,有一個www.ekiga.net可以注冊帳戶。
它從外觀上看起來似乎比linphone強大,但是,每次我把攝像頭一插下去,它就crash了。
試了一下,ekiga和linphone可以互聯互通。

在linux下你還在找windows中類似飛鴿傳書的東東嗎?用Ekiga和linphone吧。

Copyright © Linux教程網 All Rights Reserved