安装本地包以替换已安装的包

dab*_*oss 6 installation dpkg

我正在尝试安装一个本地构建的 .deb 文件,该文件将替换已安装的包。

尝试使用dpkg -i结果如下:

dabo@chrubuntu:~/Downloads/mali$ sudo dpkg -i chromium-mali-opengles_0.45-0ubuntu1_armhf.deb 
dpkg: considering removing libegl1-mesa:armhf in favour of chromium-mali-opengles:armhf ...
dpkg: no, cannot proceed with removal of libegl1-mesa:armhf (--auto-deconfigure will help):
 libegl1-mesa-drivers:armhf depends on libegl1-mesa (= 9.1.4-0ubuntu0.1)
  libegl1-mesa:armhf is to be removed.

dpkg: regarding chromium-mali-opengles_0.45-0ubuntu1_armhf.deb containing chromium-mali-opengles:armhf:
 chromium-mali-opengles conflicts with libegl1-x11
  libegl1-mesa:armhf provides libegl1-x11 and is present and installed.

dpkg: error processing chromium-mali-opengles_0.45-0ubuntu1_armhf.deb (--install):
 conflicting packages - not installing chromium-mali-opengles:armhf
Errors were encountered while processing:
 chromium-mali-opengles_0.45-0ubuntu1_armhf.deb
Run Code Online (Sandbox Code Playgroud)

当我尝试卸载 libegl1-mesa 时,它也会卸载大量依赖它的其他软件包。

有没有办法安装chromium-mali-opengles_0.45-0ubuntu1_armf.deb?

我想做的一件事是使用dpkg --get-selections保存所有包名称,卸载 libegl1-mesa 及其所有依赖项,安装chromium-mali-opengles,然后使用dpkg --set-selections. 这会是一个非常糟糕的主意吗?

我也很确定像 aptitude 这样的东西可以让我同时卸载一个并安装另一个,而无需卸载所有依赖于它的软件包。虽然我不知道有什么方法可以使用 aptitude 来做到这一点。

我也试过使用 gdebi,认为它可能有更多的依赖管理,但它给出了 dpkg 给出的相同错误。

Rad*_*anu 5

首先尝试解决依赖项的问题,然后尝试使用以下命令安装它:

sudo dpkg -i -B chromium-mali-opengles_0.45-0ubuntu1_armhf.deb
Run Code Online (Sandbox Code Playgroud)

man dpkg

-B, --auto-deconfigure
          When  a  package is removed, there is a possibility that another
          installed package depended on the  removed  package.  Specifying
          this  option will cause automatic deconfiguration of the package
          which depended on the removed package.
Run Code Online (Sandbox Code Playgroud)