尝试安装 Firefox Xvfb 时出现依赖循环

尝试安装 Firefox Xvfb 时出现依赖循环

我正在 16.04.4(服务器)上安装 Firefox xvfb,以便我可以使用带有 Selenium 的 Firefox 驱动程序,以便使用 Python 对我们的网站进行屏幕截图。不幸的是,我陷入了某种安装依赖循环。

当我安装 Firefox xvfb 时,出现以下错误:

sudo apt-get install firefox xvfb
...
firefox : Depends: libgtk-3-0 (>= 3.4) but it is not going to be installed

所以我的下一个合乎逻辑的步骤是安装依赖项。

sudo apt-get install libgtk-3-0
...
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:
libgtk-3-0 : Depends: libwayland-egl1-mesa (>= 10.0.2) but it is not going to be installed or
                   libwayland-egl1
E: Unable to correct problems, you have held broken packages.

我在 AU 上搜索如何搜索损坏的包裹,偶然发现了此链接它指示我运行命令:

dpkg -l | grep ^..r

不幸的是,这什么也没有返回。

我不知道下一步该做什么,我有:

apt-get update
apt-get upgrade
apt-get update –fix-missing

并尝试使用 aptitude 来安装所有相同的东西。

不确定这是否相关,但之前尝试使用 pip3 安装时也发生过类似的事情。最终我放弃了,并坚持使用 python 2.7 进行这个项目。我不认为这是 Firefox xvfb 问题,因为我也尝试安装 google-chrome-stable 但没有成功。

任何帮助或故障排除步骤都将不胜感激。

更新:

输出apt-cache 策略 Firefox xvfb:

firefox:
  Installed: 45.0.2+build1-0ubuntu1
  Candidate: 64.0~b13+build1-0ubuntu0.16.04.1
  Version table:
     64.0~b13+build1-0ubuntu0.16.04.1 500
        500 http://ppa.launchpad.net/mozillateam/firefox-next/ubuntu xenial/main amd64 Packages
 *** 45.0.2+build1-0ubuntu1 500
        500 http://archive.ubuntu.com/ubuntu xenial/main amd64 Packages
        100 /var/lib/dpkg/status
xvfb:
  Installed: 2:1.18.3-1ubuntu2
  Candidate: 2:1.18.3-1ubuntu2
  Version table:
 *** 2:1.18.3-1ubuntu2 500
        500 http://archive.ubuntu.com/ubuntu xenial/universe amd64 Packages
        100 /var/lib/dpkg/status

答案1

考虑清除 Mozilla 的 PPA:

sudo apt install ppa-purge
sudo ppa-purge ppa:mozillateam/firefox-next

解决依赖性错误。

另请注意,官方 Ubuntu 存储库有Firefox 63.0和 64 没有太大区别……

相关内容