Ubuntu18.04编译vlc-3.0.10

Ubuntu18.04编译vlc-3.0.10

  • xym01
  • 1
  • 2020-06-01 04:15

最近要整一些视频操作,选择了vlc-qt。奈何使用vlc-qt需要先编译vlc。

1、首先下载vlc

访问官网https://www.videolan.org/vlc/ 选择要下载的版本 ,当然也可以直接下载http://get.videolan.org/vlc/3.0.10/vlc-3.0.10.tar.xz

将源码下载到本地后,开始尝试着编译,为什么说是尝试,因为会遇到各种各样的报错。


2、尝试配置

cd到源码的主目录,执行命令

./bootstrap

./configure

出现报错:configure: error: Could not find lua. Lua is needed for some interfaces (rc, telnet, http) as well as many other custom scripts. Use --disable-lua to ignore this error.

解决方案:根据./configure命令提示,下载对应的lua,我这里以下执行命令:

sudo apt install lua5.2

sudo apt install lua5.2-dev

-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------

再次执行./configure

出现报错:configure: error: Missing libav or FFmpeg. Pass --disable-avcodec to ignore this error.

解决方案:这里有两种解决方案。

方案(1)  执行命令: ./configure --prefix=/usr/local/vlc  --disable-avcodec  .让其直接忽略这个错误即可。

方案(2)执行命令:sudo apt install  libavcodec-dev   。

我是采用第二种方案。

 

再次执行./configure

出现报错:configure: error: No package 'libswscale' found. Pass --disable-swscale to ignore this error. Proper software scaling and some video chroma conversion will be missing.

解决方案:这里有两种解决方案。

方案(1)  执行命令: ./configure --prefix=/usr/local/vlc  --disable-avcodec --disable-swscale  .让其直接忽略这个错误即可。

方案(2)执行命令:sudo apt install  libswscale-dev  。

我是采用第二种方案。

 

再次执行./configure

出现报错:configure: error: No package 'liba52' found. Pass --disable-a52 ........(此处省略好多字母)

解决方案:这里有两种解决方案。

方案(1)  执行命令: ./configure --prefix=/usr/local/vlc  --disable-avcodec --disable-swscale --disable-a52 .让其直接忽略这个错误即可。

方案(2)执行命令:sudo apt install  liba52-dev 

我是采用第二种方案。

 

再次执行./configure

出现报错:configure: error: No package 'libpostproc' found. Pass  ........(此处省略好多字母)

解决方案:

执行命令:sudo apt install  libpostproc-dev 

 

再次执行./configure

出现报错:configure: error: Package requirements (xcb-shm) were not met:No package 'xcb-shm' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables XCB_SHM_CFLAGS and XCB_SHM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

解决方案:

sudo apt install pkg-config

sudo apt install autoconf

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

执行./bootstrap

出现报错:

NOTE: autopoint (GNU gettext-tools) appears to be missing or out-of-date. Please install or update GNU gettext tools. Otherwise, you will not be able to build a source tarball. ==========================================================================

autoreconf: Entering directory `.' autoreconf: running: true --force autoreconf: running: aclocal -I m4 -I m4 --output=aclocal.m4t Can't exec "aclocal": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 326. autoreconf: failed to run aclocal: No such file or directory

解决方案:sudo apt install automake

 

再次执行./bootstrap

出现报错:

NOTE: autopoint (GNU gettext-tools) appears to be missing or out-of-date. Please install or update GNU gettext tools. Otherwise, you will not be able to build a source tarball. ==========================================================================

autoreconf: Entering directory `.' autoreconf: running: true --force autoreconf: running: aclocal -I m4 --force -I m4 autoreconf: configure.ac: tracing autoreconf: running: libtoolize --copy --force Can't exec "libtoolize": No such file or directory at /usr/share/autoconf/Autom4te/FileUtils.pm line 345, <GEN3> line 6. autoreconf: failed to run libtoolize: No such file or directory autoreconf: libtoolize is needed because this package uses Libtool

解决方案:sudo apt install libtool

 

重新执行./bootstrap,则可以成功通过

 

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------

重新执行命令:./configure --prefix=/usr/local/vlc

出现报错:

configure: error: Package requirements (xcb-shm) were not met:

No package 'xcb-shm' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables XCB_SHM_CFLAGS and XCB_SHM_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

解决方案:sudo apt install libxcb-shm0-dev

 

重新执行命令:./configure --prefix=/usr/local/vlc 

出现报错:

configure: error: Package requirements (xcb-xv >= 1.1.90.1) were not met:

No package 'xcb-xv' found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables XCB_XV_CFLAGS and XCB_XV_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.

解决方案:sudo apt install libxcb-xv0-dev

 

重新执行命令:./configure --prefix=/usr/local/vlc 

出现报错:configure: error: No package 'alsa' found. alsa-lib 1.0.24 or later required. Pass --disable-alsa to ignore this error.

解决方案:sudo apt install libalsa-ocaml-dev

 

再次执行命令./configure --prefix=/usr/local/vlc,配置成功

 


执行命令:

make -j4

sudo make install

vlc就编译安装完成了!!!!

 

  • 0
    点赞
  • 6
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值