每当我尝试安装 VLC 播放器时,都会收到以下错误:
hutber@hutber:~$ sudo apt-get install vlc
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies.
vlc : Depends: vlc-nox (= 2.2.4-1~deb8u1) but it is not going to be installed
Depends: libgles1-mesa (>= 7.8.1) but it is not going to be installed or
libgles1
Depends: libvncclient0 (>= 0.9.9) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
然后我尝试手动安装依赖项。
libgles1-mesa:
Depends: libglapi-mesa (=12.0.6-0ubuntu0.16.04.1) but 17.1.0~git20170509+17.1.da13cc7e-0ubuntu0ricotz~16.04.1 is to be installed
为什么我无法安装 VLC?
[编辑]
hutber@hutber:~/vlc-build$ sed -i '/gles1/d' debian/{control,rules,*.install*}
hutber@hutber:~/vlc-build$ dch -n "Drop GLES 1 support (Mesa 17 no longer provides it)."
hutber@hutber:~/vlc-build$ dch -r ignored
hutber@hutber:~/vlc-build$ mk-build-deps
dh_testdir
dh_testroot
dh_prep
dh_testdir
dh_testroot
dh_install
dh_install: Compatibility levels before 9 are deprecated (level 7 in use)
dh_installdocs
dh_installdocs: Compatibility levels before 9 are deprecated (level 7 in use)
dh_installchangelogs
dh_compress
dh_fixperms
dh_installdeb
dh_installdeb: Compatibility levels before 9 are deprecated (level 7 in use)
dh_gencontrol
dh_md5sums
dh_builddeb
dpkg-deb: building package 'vlc-build-deps' in '../vlc-build-deps_2.2.4-1~deb8u1.2_amd64.deb'.
The package has been created.
Attention, the package has been created in the current directory,
not in ".." as indicated by the message above!
hutber@hutber:~/vlc-build$ sudo gdebi vlc-build-deps_*.deb
Reading package lists... Done
Building dependency tree
Reading state information... Done
Reading state information... Done
build-dependencies for vlc
Dependency package to build the 'vlc' package
Do you want to install the software package? [y/N]:y
(Reading database ... 320548 files and directories currently installed.)
Preparing to unpack vlc-build-deps_2.2.4-1~deb8u1.2_amd64.deb ...
Unpacking vlc-build-deps (2.2.4-1~deb8u1.2) over (2.2.4-1~deb8u1.1) ...
Setting up vlc-build-deps (2.2.4-1~deb8u1.2) ...
hutber@hutber:~/vlc-build$ mv vlc-build-deps_*.deb ..
hutber@hutber:~/vlc-build$ dpkg-buildpackage -us -uc
dpkg-buildpackage: source package vlc
dpkg-buildpackage: source version 2.2.4-1~deb8u1.2
dpkg-buildpackage: source distribution xenial
dpkg-buildpackage: source changed by Jamie Hutber <hutber@hutber>
dpkg-buildpackage: host architecture amd64
dpkg-source --before-build vlc-build
fakeroot debian/rules clean
dh clean --parallel --with autoreconf
dh_testdir
debian/rules override_dh_auto_clean
make[1]: Entering directory '/home/hutber/vlc-build'
rm -f debian/vlc.install debian/vlc-nox.install
dh_auto_clean
make[1]: Leaving directory '/home/hutber/vlc-build'
dh_autoreconf_clean
dh_clean
dpkg-source -b vlc-build
dpkg-source: error: can't build with source format '3.0 (quilt)': no upstream tarball found at ../vlc_2.2.4.orig.tar.{bz2,gz,lzma,xz}
dpkg-buildpackage: error: dpkg-source -b vlc-build gave error exit status 255
答案1
鉴于您libglapi-mesa
安装了版本 17,我猜测您已经从 Mint 默认值之外的其他存储库更新了 Mesa。 Mesa 17 放弃了 GLES1 支持,但 VLC 软件包是依赖于 GLES1 构建的,因此您无法使用 Mesa 安装 VLC 软件包。
不过,您可以在没有 GLES1 的情况下构建自己的 VLC 软件包:
安装基本的构建工具和我们将要使用的一些实用程序:
sudo apt-get install build-essential devscripts equivs gdebi
进入一个可以写入的目录
cd mkdir vlc-build cd vlc-build
下载VLC包的源代码
apt-get source vlc
或者,如果您的存储库的配置不允许其工作,
dget http://security.debian.org/pool/updates/main/v/vlc/vlc_2.2.4-1~deb8u1.dsc
(与 Mint 中的版本匹配)
在提取的目录中(
vlc-2.2.4
可能),编辑一些文件:sed -i '/gles1/d' debian/{control,rules,*.install*}
仍然在提取的目录中,运行以下命令来更新更改日志并生成新版本(这样您的私有版本不会被现有版本替换):
dch -n "Drop GLES 1 support (Mesa 17 no longer provides it)." dch -r ignored
安装构建依赖项(不幸的是,您无法使用,
apt-get build-dep vlc
因为您无法安装 GLES 1 库):mk-build-deps sudo gdebi vlc-build-deps_*.deb mv vlc-build-deps_*.deb ..
(最后一步将生成的依赖包移开)
构建包:
dpkg-buildpackage -us -uc
现在您可以安装您需要的任何软件包,您将在父目录中找到它们:
ls ../*.deb
现在,您需要密切关注 VLC 的未来更新(有时会发生这种情况,特别是为了解决安全问题),并在必要时重复该过程。