我喜欢能够在Ubuntu上安装PlayStore应用程序的想法,但是我在安装Anbox时遇到了错误。我对一步一步的回答感兴趣(考虑到解决任何问题),这样像我这样的临时Ubuntu用户就可以从解决方案中获益。
这可能是以下问题的重复,但不同之处在于,我要求的答案是Ubuntu19.10:可能重复的因果用户如何使用
故障排除
由于下面的注释疑难解答,本教程将引导我同时安装deb和snap安装。因此,我把它们分开,分别排除它们的故障。
通过Deb实现Install:
在这里,我通过deb安装了Anbox:
max@msi:~$ sudo apt-get install anbox
[sudo] password for max:
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
bridge-utils libboost-log1.67.0 libboost-program-options1.67.0
libboost-regex1.67.0 liblxc-common liblxc1 libpam-cgfs libprotobuf-lite17
libsdl2-2.0-0 libsdl2-image-2.0-0 lxc lxc-utils lxcfs uidmap
Suggested packages:
ifupdown btrfs-tools lvm2 lxc-templates lxctl
The following NEW packages will be installed:
anbox bridge-utils libboost-log1.67.0 libboost-program-options1.67.0
libboost-regex1.67.0 liblxc-common liblxc1 libpam-cgfs libprotobuf-lite17
libsdl2-2.0-0 libsdl2-image-2.0-0 lxc lxc-utils lxcfs uidmap
0 upgraded, 15 newly installed, 0 to remove and 0 not upgraded.
Need to get 3,844 kB of archives.
After this operation, 18.6 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 lxcfs amd64 3.0.4-2 [40.7 kB]
Get:2 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libboost-regex1.67.0 amd64 1.67.0-13ubuntu1 [458 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libboost-log1.67.0 amd64 1.67.0-13ubuntu1 [584 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libboost-program-options1.67.0 amd64 1.67.0-13ubuntu1 [333 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 liblxc-common amd64 3.0.4-0ubuntu1 [440 kB]
Get:6 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 liblxc1 amd64 3.0.4-0ubuntu1 [257 kB]
Get:7 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 libprotobuf-lite17 amd64 3.6.1.3-2 [129 kB]
Get:8 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libsdl2-2.0-0 amd64 2.0.10+dfsg1-1ubuntu1 [405 kB]
Get:9 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libsdl2-image-2.0-0 amd64 2.0.5+dfsg1-1 [63.7 kB]
Get:10 http://us.archive.ubuntu.com/ubuntu eoan/main amd64 bridge-utils amd64 1.6-2ubuntu1 [30.5 kB]
Get:11 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 lxc-utils amd64 3.0.4-0ubuntu1 [354 kB]
Get:12 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 lxc all 3.0.4-0ubuntu1 [2,960 B]
Get:13 http://us.archive.ubuntu.com/ubuntu eoan/multiverse amd64 anbox amd64 0.0~git20190124-1 [651 kB]
Get:14 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 libpam-cgfs amd64 3.0.4-0ubuntu1 [30.8 kB]
Get:15 http://us.archive.ubuntu.com/ubuntu eoan/universe amd64 uidmap amd64 1:4.5-1.1ubuntu4 [65.7 kB]
Fetched 3,844 kB in 2s (1,655 kB/s)
Selecting previously unselected package lxcfs.
(Reading database ... 198438 files and directories currently installed.)
Preparing to unpack .../00-lxcfs_3.0.4-2_amd64.deb ...
Unpacking lxcfs (3.0.4-2) ...
Selecting previously unselected package libboost-regex1.67.0:amd64.
Preparing to unpack .../01-libboost-regex1.67.0_1.67.0-13ubuntu1_amd64.deb ...
Unpacking libboost-regex1.67.0:amd64 (1.67.0-13ubuntu1) ...
Selecting previously unselected package libboost-log1.67.0.
Preparing to unpack .../02-libboost-log1.67.0_1.67.0-13ubuntu1_amd64.deb ...
Unpacking libboost-log1.67.0 (1.67.0-13ubuntu1) ...
Selecting previously unselected package libboost-program-options1.67.0:amd64.
Preparing to unpack .../03-libboost-program-options1.67.0_1.67.0-13ubuntu1_amd64.deb ...
Unpacking libboost-program-options1.67.0:amd64 (1.67.0-13ubuntu1) ...
Selecting previously unselected package liblxc-common.
Preparing to unpack .../04-liblxc-common_3.0.4-0ubuntu1_amd64.deb ...
Unpacking liblxc-common (3.0.4-0ubuntu1) ...
Selecting previously unselected package liblxc1.
Preparing to unpack .../05-liblxc1_3.0.4-0ubuntu1_amd64.deb ...
Unpacking liblxc1 (3.0.4-0ubuntu1) ...
Selecting previously unselected package libprotobuf-lite17:amd64.
Preparing to unpack .../06-libprotobuf-lite17_3.6.1.3-2_amd64.deb ...
Unpacking libprotobuf-lite17:amd64 (3.6.1.3-2) ...
Selecting previously unselected package libsdl2-2.0-0:amd64.
Preparing to unpack .../07-libsdl2-2.0-0_2.0.10+dfsg1-1ubuntu1_amd64.deb ...
Unpacking libsdl2-2.0-0:amd64 (2.0.10+dfsg1-1ubuntu1) ...
Selecting previously unselected package libsdl2-image-2.0-0:amd64.
Preparing to unpack .../08-libsdl2-image-2.0-0_2.0.5+dfsg1-1_amd64.deb ...
Unpacking libsdl2-image-2.0-0:amd64 (2.0.5+dfsg1-1) ...
Selecting previously unselected package bridge-utils.
Preparing to unpack .../09-bridge-utils_1.6-2ubuntu1_amd64.deb ...
Unpacking bridge-utils (1.6-2ubuntu1) ...
Selecting previously unselected package lxc-utils.
Preparing to unpack .../10-lxc-utils_3.0.4-0ubuntu1_amd64.deb ...
Unpacking lxc-utils (3.0.4-0ubuntu1) ...
Selecting previously unselected package lxc.
Preparing to unpack .../11-lxc_3.0.4-0ubuntu1_all.deb ...
Unpacking lxc (3.0.4-0ubuntu1) ...
Selecting previously unselected package anbox.
Preparing to unpack .../12-anbox_0.0~git20190124-1_amd64.deb ...
Unpacking anbox (0.0~git20190124-1) ...
Selecting previously unselected package libpam-cgfs.
Preparing to unpack .../13-libpam-cgfs_3.0.4-0ubuntu1_amd64.deb ...
Unpacking libpam-cgfs (3.0.4-0ubuntu1) ...
Selecting previously unselected package uidmap.
Preparing to unpack .../14-uidmap_1%3a4.5-1.1ubuntu4_amd64.deb ...
Unpacking uidmap (1:4.5-1.1ubuntu4) ...
Setting up libboost-program-options1.67.0:amd64 (1.67.0-13ubuntu1) ...
Setting up libboost-regex1.67.0:amd64 (1.67.0-13ubuntu1) ...
Setting up libpam-cgfs (3.0.4-0ubuntu1) ...
Setting up lxcfs (3.0.4-2) ...
Created symlink /etc/systemd/system/multi-user.target.wants/lxcfs.service → /lib/systemd/system/lxcfs.service.
Setting up libprotobuf-lite17:amd64 (3.6.1.3-2) ...
Setting up uidmap (1:4.5-1.1ubuntu4) ...
Setting up libboost-log1.67.0 (1.67.0-13ubuntu1) ...
Setting up bridge-utils (1.6-2ubuntu1) ...
Setting up libsdl2-2.0-0:amd64 (2.0.10+dfsg1-1ubuntu1) ...
Setting up libsdl2-image-2.0-0:amd64 (2.0.5+dfsg1-1) ...
Setting up liblxc1 (3.0.4-0ubuntu1) ...
Setting up lxc-utils (3.0.4-0ubuntu1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/lxc-net.service → /lib/systemd/system/lxc-net.service.
Created symlink /etc/systemd/system/multi-user.target.wants/lxc.service → /lib/systemd/system/lxc.service.
Setting up lxc dnsmasq configuration.
Setting up lxc (3.0.4-0ubuntu1) ...
Setting up liblxc-common (3.0.4-0ubuntu1) ...
Setting up anbox (0.0~git20190124-1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/anbox-container-manager.service → /lib/systemd/system/anbox-container-manager.service.
Processing triggers for desktop-file-utils (0.24-1ubuntu1) ...
Processing triggers for mime-support (3.63ubuntu1) ...
Processing triggers for gnome-menus (3.32.0-1ubuntu1) ...
Processing triggers for libc-bin (2.30-0ubuntu2) ...
Processing triggers for systemd (242-7ubuntu3.7) ...
Processing triggers for man-db (2.8.7-3) ...此时我重新启动并尝试运行Anbox并发现了以下错误:
max@msi:~$ anbox session-manager
[ 2020-02-19 15:01:01] [session_manager.cpp:130@operator()] Failed to start as either binder or ashmem kernel drivers are not loaded
max@msi:~$ 通过以下操作,我克服了这个错误:
我通过按Clone/Download按钮下载了收件箱模块这里:
我提取并使用终端导航到收件箱模块-主目录:
cd anbox-modules-master/我运行了以下命令:
sudo cp anbox.conf /etc/modules-load.d/
sudo cp 99-anbox.rules /lib/udev/rules.d/
sudo cp -rT ashmem /usr/src/anbox-ashmem-1
sudo cp -rT binder /usr/src/anbox-binder-1
sudo dkms install anbox-ashmem/1
sudo dkms install anbox-binder/1我在这里加载了模块:
sudo modprobe ashmem_linux
sudo modprobe binder_linux我验证了这个命令的正确性:
lsmod | grep -e ashmem_linux -e binder_linux输出如下所示:
binder_linux 163840 0
ashmem_linux 20480 0我还使用以下命令进行了验证:
ls -alh /dev/binder /dev/ashmem我得到了这个输出:
ls: cannot access '/dev/binder': No such file or directory
crw------- 1 root root 10, 55 Feb 19 15:54 /dev/ashmem现在我不知道该怎么办,因为收件箱不会启动:
max@msi:~/anbox-modules-master$ anbox session-manager
[ 2020-02-20 00:38:23] [session_manager.cpp:130@operator()] Failed to start as either binder or ashmem kernel drivers are not loaded发布于 2020-03-16 22:15:27
我已经安装并测试了来自snap的edge版本,它成功了。Anbox可以使用以下命令安装并从GUI应用程序中运行:
sudo snap install --devmode --edge anbox在安装之前,请阅读并理解边缘发布意味着什么。
edge:用于希望密切跟踪开发的用户。边缘版本通常包括一个移动的更改流,而不需要QA或评审承诺,通常是由CI过程从任意源代码快照自动生成的。通常CI只在某种自动QA通过之后才会发布,代码评审仍然是一个很好的实践,但这些都是特定于项目的。假设边缘释放可能经常中断。
https://askubuntu.com/questions/1211592
复制相似问题