如何在我的操作系统中安装 anbox?

如何在我的操作系统中安装 anbox?

我正在尝试安装,anbox但收到有关失败的依赖项解决方案的错误消息。

我运行 Debian:

uname -a
Linux xxxx 4.9.0-11-amd64 #1 SMP Debian 4.9.189-3+deb9u2 (2019-11-11) x86_64 GNU/Linux
  • 尝试安装时anbox

    sudo apt install anbox
    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:
     anbox : Depends: libegl1 but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    
  • 如果我随后尝试libegl1手动安装:

    sudo apt install  libegl1
    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:
     libegl1 : Depends: libegl-mesa0 but it is not going to be installed
    E: Unable to correct problems, you have held broken packages.
    
  • 如果我随后尝试libegl-mesa0手动安装:

    sudo apt install  libegl1   libegl-mesa0
    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:
     libegl-mesa0 : Depends: libdrm2 (>= 2.4.75) but 2.4.74-1 is to be installed
                    Depends: libgbm1 (= 18.2.8-2~bpo9+1) but 13.0.6-1+b2 is to be installed
                    Depends: libwayland-client0 (>= 1.15.0) but 1.12.0-1+deb9u1 is to be installed
                    Depends: libwayland-server0 (>= 1.15.0) but 1.12.0-1+deb9u1 is to be installed
    E: Unable to correct problems, you have held broken packages.
    

那么如何安装anbox在我的操作系统中呢?

答案1

套餐盒子在稳定的 Debian 9 存储库中不可用:它在 Debian 10 或 Debian 9 中可用向后移植额外的存储库。作为盒子仅在向后移植中可用,它是从那里自动选择的(假设已添加存储库),但不是其依赖项(除非它们也仅在向后移植中可用)。

反向移植存储库中的软件包可以依赖于反向移植存储库中的任何其他软件包,而不仅仅是其基础存储库(即 Debian 9 又名 oldstable):有一个完整的反向移植生态系统。

正确的命令是安装盒子包是:

apt-get -t stretch-backports install anbox

这将拉取所有包依赖项。从您的消息中可以看出,这将在此过程中将 mesa 或其部分内容从 13.0.6 升级到 18.2.8。

但专门针对盒子,这还不够。盒子(其实并不是盒子本身,但系统模拟盒子容器)依赖于特殊的 Android 内核功能(例如:ANDROID_BINDER_IPC)过去仅在 Android 补丁内核上可用,然后才被纳入主线,并且很少添加到库存发行版内核中,除非所述发行版附带需要它的工具...例如盒子。因此,Debian 9 的原生内核​​版本 4.9 中不存在这些选项。您还必须安装向后移植的内核:

apt-get -t stretch-backports install linux-image-amd64

由于固件和内核通常是捆绑在一起的,因此您拥有的软件包的名称中包含该单词firmware(例如:固件-iwlwifi)您还必须尝试将它们升级到拉伸向后移植版本相同的方式(如果可用)。

这可能会改变系统和硬件的行为。例如,如果您使用专有的图形驱动程序,这种升级可能不会完全顺利。如果出现问题,您仍然可以使用以前的 4.9 内核启动(通常固件包仍然保留旧版本)。

相关内容