在Ubuntu下编译VLC源代码生成的VLC无法播放Youtube视频(比如https://www.youtube.com/watch?v=mDp-ABzpRX8)
错误提示如下:
[email protected]:~/vlc-2.1.5$ ./vlc VLC media player 2.1.5 Rincewind (revision 2.1.4-49-gdab6cb5) [0x9872a98] main libvlc: 正在以默认界面运行 vlc,使用 ‘cvlc‘ 将 vlc 运行在无界面的状态下。 [0x9931448] main tls client error: TLS client plugin not available [0xb5d034d8] main input error: open of `https://www.youtube.com/watch?v=mDp-ABzpRX8‘ failed
原因是缺少TLS客户端插件,因此需要将GNUTLS库编译进来。
下载GNUTLS库,最新版本3.3.12,configure时报错,缺少依赖库Libnettle,而且只能适配2.7.1,nettle3.0还不行。
[email protected]:~/gnutls-3.3.12$ ./configure --prefix=/usr configure: error: *** *** Libnettle 2.7.1 was not found. Note that this version of gnutls doesn‘t support nettle 3.0.
又去下载NETTLE库,编译安装,再运行GNUTLS的configure,NETTLE倒是检查通过,但依然报错,还需要HOGWEED库和GMP。
[email protected]:~/gnutls-3.3.12$ ./configure --prefix=/usr .................. checking for NETTLE... yes checking for HOGWEED... no configure: error: *** *** Libhogweed (nettle‘s companion library) was not found. Note that you must compile nettle with gmp support.
下载GMP库,编译安装:How to Install GMP in Ubuntu
下载HOGWEED库,编译安装。
然后,需要重新配置安装NETTLE,可以参考这篇文章(遇到的一模一样的问题及解决方案)。
再再次重新配置编译GNUTLS,
configure正常通过,但make时又报错了,典型的undefined reference to的error问题。
../lib/.libs/libgnutls.so: undefined reference to `nettle_umac96_set_key‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_salsa20_crypt‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_umac128_update‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_umac96_set_nonce‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_salsa20_set_key‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_umac128_set_nonce‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_umac128_set_key‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_umac96_digest‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_salsa20_set_iv‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_umac128_digest‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_salsa20r12_crypt‘ ../lib/.libs/libgnutls.so: undefined reference to `nettle_umac96_update‘ collect2: ld returned 1 exit status make[4]: *** [psktool] Error 1 make[4]: Leaving directory `/home/zlf/gnutls-3.3.12/src‘ make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/zlf/gnutls-3.3.12/src‘ make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/zlf/gnutls-3.3.12/src‘ make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/zlf/gnutls-3.3.12‘ make: *** [all] 错误 2
时间: 2024-10-31 01:56:26