红联Linux门户
Linux帮助

Ubuntu Kylin编译vlc

发布时间:2015-09-23 15:38:54来源:linux网站作者:zhbpd

首先参考官方文档:https://wiki.videolan.org/UnixCompile/


1.安装工具

sudo apt-get install git libtool build-essential pkg-config autoconf


2.下载代码

git clone git://git.videolan.org/vlc.git


3.下载依赖内容

sudo apt-get build-dep vlc

这时候会报告一些错误,例如:

下列软件包有未满足的依赖关系:
libegl1-mesa-dev : 依赖: libmirclient-dev 但是它将不会被安装
E: 不能满足软件包 vlc 所要求的构建依赖关系。

然后安装这个,结果发现还有其他依赖,最后定位到要安装 libprotobuf9v5-dev

直接安装这个:

sudo apt-get install libprotobuf9v5
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
下列软件包是自动安装的并且现在不需要了:
libhogweed2:i386 libnettle4:i386
使用'apt-get autoremove'来卸载它(它们)。
将会安装下列额外的软件包:
adwaita-icon-theme libatk1.0-0 libatk1.0-data libboost-filesystem1.58.0
libdecoration0 libgail-3-0 libgtk-3-0 libgtk-3-common libmirclient9
libmircommon5 libmirprotobuf1 libprotobuf-lite9v5 libprotoc9v5
libxkbcommon-x11-0 libxkbcommon0 overlay-scrollbar protobuf-compiler
下列软件包将被【卸载】:
compiz compiz-gnome compiz-plugins-default libcompizconfig0 libmirclient8
libmirprotobuf0 libprotobuf9 libprotoc9 mir-client-platform-mesa2
overlay-scrollbar-gtk3 python-compizconfig unity youker-assistant
下列【新】软件包将被安装:
libboost-filesystem1.58.0 libmirclient9 libmircommon5 libmirprotobuf1
libprotobuf-lite9v5 libprotobuf9v5 libprotoc9v5
下列软件包将被升级:
adwaita-icon-theme libatk1.0-0 libatk1.0-data libdecoration0 libgail-3-0
libgtk-3-0 libgtk-3-common libxkbcommon-x11-0 libxkbcommon0
overlay-scrollbar protobuf-compiler
升级了 11 个软件包,新安装了 7 个软件包,要卸载 13 个软件包,有 1298 个软件包未被升级。
需要下载 4,727 kB 的软件包。
解压缩后将会空出 16.1 MB 的空间。
您希望继续执行吗? [Y/n] y

然后选举y继续安装,安装好后,再次执行 sudo apt-get build-dep vlc 好了,这次没有错误了:

sudo apt-get build-dep vlc
正在读取软件包列表... 完成
正在分析软件包的依赖关系树      
正在读取状态信息... 完成      
下列软件包将被【卸载】:
  libasound2-plugins:i386 libdouble-conversion1 libjack-jackd2-0
  libjack-jackd2-0:i386 libllvm3.6 libllvm3.6:i386 libtag1-vanilla libtag1c2a
下列【新】软件包将被安装:
  debhelper dh-autoreconf dh-buildinfo gettext gir1.2-gtk-2.0 gir1.2-rsvg-2.0
  icu-devtools intltool-debian liba52-0.7.4-dev libaa1-dev libasound2-dev
  libass-dev libatk1.0-dev libavahi-client-dev libavahi-common-dev
  libavc1394-dev libavcodec-dev libavcodec-ffmpeg56 libavformat-dev
  libavformat-ffmpeg56 libavutil-dev libavutil-ffmpeg54
  libbasicusageenvironment0 libbluray-dev libcaca-dev
  libcairo-script-interpreter2 libcairo2-dev libcddb2 libcddb2-dev libcdio-dev
  libchromaprint-dev libchromaprint0 libcrystalhd-dev libcrystalhd3
  libdbus-1-dev libdc1394-22 libdc1394-22-dev libdca-dev libdirectfb-dev
  libdirectfb-extra libdouble-conversion1v5 libdvbpsi-dev libdvbpsi10
  libdvdnav-dev libdvdread-dev libebml-dev libebml4v5 libegl1-mesa-dev
  libenca-dev libexpat1-dev libfaad-dev libflac-dev libfluidsynth-dev
  libfontconfig1-dev libfreerdp-dev libfreerdp-rail1.1 libfreetype6-dev
  libfribidi-dev libgcrypt20-dev libgdk-pixbuf2.0-dev libgles1-mesa
  libgles1-mesa-dev libgles2-mesa libgles2-mesa-dev libglib2.0-dev
  libglu1-mesa-dev libgme0 libgmp-dev libgmpxx4ldbl libgnutls-dev
  libgnutls28-dev libgnutlsxx28 libgpg-error-dev libgroupsock1 libgtk2.0-dev
  libharfbuzz-dev libharfbuzz-gobject0 libice-dev libicu-dev libidn11-dev
  libiso9660-8 libiso9660-dev libjack-dev libjack0 libjbig-dev libjpeg-dev
  libjpeg-turbo8-dev libjpeg8-dev libkate-dev libkate1 liblircclient-dev
  liblivemedia-dev liblivemedia23 libllvm3.6v5 libllvm3.6v5:i386 liblua5.2-dev
  liblzma-dev libmad0-dev libmatroska-dev libmatroska6v5 libmodplug-dev
  libmodplug1 libmpcdec-dev libmpcdec6 libmpeg2-4 libmpeg2-4-dev libmtp-dev
  libncurses5-dev libncursesw5-dev libnotify-dev libogg-dev
  libomxil-bellagio-bin libomxil-bellagio-dev libomxil-bellagio0 libopus-dev
  liborc-0.4-dev libp11-kit-dev libpango1.0-dev libpcre16-3 libpcre3-dev
  libpcre32-3 libpcrecpp0v5 libpixman-1-dev libpng12-dev libpostproc-dev
  libpostproc-ffmpeg53 libpulse-dev libqt5concurrent5 libqt5x11extras5
  libqt5x11extras5-dev libraw1394-dev libreadline-dev libreadline6-dev
  libresid-builder-dev libresid-builder0c2a librsvg2-dev libsamplerate0-dev
  libschroedinger-dev libsdl-image1.2-dev libsdl1.2-dev libset-scalar-perl
  libshine-dev libshine3 libshout3-dev libsidplay2-dev libsidplay2v5
  libslang2-dev libsm-dev libsmbclient-dev libsndfile1-dev libsoxr0
  libspeex-dev libspeexdsp-dev libssh-gcrypt-4 libssh2-1 libssh2-1-dev
  libswresample-dev libswresample-ffmpeg1 libswscale-dev libswscale-ffmpeg3
  libtag1-dev libtag1v5 libtag1v5-vanilla libtasn1-6-dev libtheora-dev
  libtiff5-dev libtiffxx5 libtinfo-dev libtwolame-dev libtwolame0 libudev-dev
  libupnp-dev libupnp6 libupnp6-dev libusageenvironment1 libusb-1.0-0-dev
  libv4l-dev libv4l2rds0 libva-dev libva-drm1 libva-egl1 libva-glx1 libva-tpi1
  libva-wayland1 libva-x11-1 libvcdinfo-dev libvcdinfo0 libvdpau-dev
  libvncclient1 libvncserver-config libvncserver-dev libvncserver1
  libvorbis-dev libwayland-dev libwebp-dev libwebpdemux1 libwinpr-asn1-0.1
  libwinpr-bcrypt0.1 libwinpr-credentials0.1 libwinpr-credui0.1
  libwinpr-crypto0.1 libwinpr-dev libwinpr-error0.1 libwinpr-io0.1
  libwinpr-pipe0.1 libwinpr-sspicli0.1 libwinpr-timezone0.1
  libwinpr-winhttp0.1 libwinpr-winsock0.1 libx264-146 libx264-dev libx265-59
  libx265-dev libxcb-composite0 libxcb-composite0-dev libxcb-keysyms1-dev
  libxcb-shm0-dev libxcb-xv0 libxcb-xv0-dev libxcomposite-dev libxcursor-dev
  libxfreerdp-client1.1 libxft-dev libxi-dev libxinerama-dev libxml2-dev
  libxpm-dev libxrandr-dev libxrender-dev libzvbi-common libzvbi-dev libzvbi0
  lua5.2 nettle-dev po-debconf qt5-qmake qtbase5-dev qtbase5-dev-tools
  uuid-dev x11proto-composite-dev x11proto-randr-dev x11proto-render-dev
  x11proto-xinerama-dev zsh zsh-common
下列软件包将被升级:
  appmenu-qt5 dpkg-dev fcitx-frontend-qt5 gir1.2-atk-1.0 gir1.2-gdkpixbuf-2.0
  gstreamer0.10-plugins-good gstreamer1.0-plugins-good gtk2-engines-pixbuf
  liba52-0.7.4 libass5 libbluray1 libcaca0 libcairo-gobject2 libcairo2
  libdpkg-perl libdvdnav4 libegl1-mesa libexpat1 libexpat1:i386 libfaad2
  libfluidsynth1 libfreerdp-cache1.1 libfreerdp-client1.1 libfreerdp-codec1.1
  libfreerdp-common1.1.0 libfreerdp-core1.1 libfreerdp-crypto1.1
  libfreerdp-gdi1.1 libfreerdp-locale1.1 libfreerdp-primitives1.1
  libfreerdp-utils1.1 libfreetype6 libfreetype6:i386 libfribidi0
  libgail-common libgail18 libgbm1 libgdk-pixbuf2.0-0 libgdk-pixbuf2.0-common
  libgl1-mesa-dri libgl1-mesa-dri:i386 libglib2.0-0 libglib2.0-0:i386
  libglib2.0-bin libgmp10 libgmp10:i386 libgstreamer-plugins-base1.0-0
  libgstreamer-plugins-good1.0-0 libgstreamer1.0-0 libgtk2.0-0 libgtk2.0-bin
  libharfbuzz-icu0 libharfbuzz0b libicu55 libicu55:i386 libldb1 liblua5.2-0
  libncurses5 libncurses5:i386 libncurses5-dev:i386 libncursesw5 libpcre3
  libpcre3:i386 libpulse-mainloop-glib0 libpulse0 libpulse0:i386 libpulsedsp
  libqt5core5a libqt5dbus5 libqt5gui5 libqt5multimedia5 libqt5network5
  libqt5opengl5 libqt5organizer5 libqt5positioning5 libqt5printsupport5
  libqt5qml5 libqt5quick5 libqt5quickwidgets5 libqt5sql5 libqt5sql5-sqlite
  libqt5svg5 libqt5test5 libqt5webkit5 libqt5widgets5 libqt5xml5 libraw1394-11
  librsvg2-2 librsvg2-common libsdl1.2debian libsmbclient libspeex1
  libtinfo-dev:i386 libtinfo5 libtinfo5:i386 libudev1 libudev1:i386 libuuid1
  libuuid1:i386 libva1 libvdpau1 libwayland-client0 libwayland-cursor0
  libwayland-egl1-mesa libwayland-server0 libwebp5 libwebpmux1 libwinpr-crt0.1
  libwinpr-dsparse0.1 libwinpr-environment0.1 libwinpr-file0.1
  libwinpr-handle0.1 libwinpr-heap0.1 libwinpr-input0.1
  libwinpr-interlocked0.1 libwinpr-library0.1 libwinpr-path0.1
  libwinpr-pool0.1 libwinpr-registry0.1 libwinpr-rpc0.1 libwinpr-sspi0.1
  libwinpr-synch0.1 libwinpr-sysinfo0.1 libwinpr-thread0.1 libwinpr-utils0.1
  libxatracker2 libxcb-shm0 libxml2 libxml2:i386 libxrender1 libxrender1:i386
  ncurses-bin pulseaudio pulseaudio-module-bluetooth pulseaudio-module-x11
  pulseaudio-utils python-ldb python-samba qml-module-qtquick-dialogs
  qml-module-qtquick-layouts qml-module-qtquick-privatewidgets
  qtdeclarative5-ubuntu-ui-toolkit-plugin samba-common samba-common-bin
samba-libs ubuntu-ui-toolkit-theme udev
升级了 147 个软件包,新安装了 245 个软件包,要卸载 8 个软件包,有 1148 个软件包未被升级。
需要下载 139 MB/147 MB 的软件包。
解压缩后会消耗掉 438 MB 的额外空间。
您希望继续执行吗? [Y/n] y

OK 了。


4.开始编译代码:

cd vlc

 ./bootstrap


linux下使用Git下载代码、编译VLC步骤:http://www.linuxdiyf.com/linux/13918.html

Ubuntu下编译VLC 2.0.1:http://www.linuxdiyf.com/linux/3004.html