无法使用 ubuntus root 访问终端在 termux 中安装任何东西,也无法从 github 安装需要 root 的 pkg

无法使用 ubuntus root 访问终端在 termux 中安装任何东西,也无法从 github 安装需要 root 的 pkg
root@localhost:~# apt update && apt upgrade
Hit:1 http://ports.ubuntu.com/ubuntu-ports disco InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports disco-updates InRelease
Hit:3 http://ports.ubuntu.com/ubuntu-ports disco-backports InRelease
Hit:4 http://ports.ubuntu.com/ubuntu-ports disco-security InRelease
Reading package lists... Done
Building dependency tree
Reading state information... Done
All packages are up to date.
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
E: Setting in Start via TCSAFLUSH for stdin failed! - tcsetattr (13: Permission denied)
Setting up udisks2 (2.8.2-1) ...
Failed to scan devices: No such file or directory
dpkg: error processing package udisks2 (--configure):
 installed udisks2 package post-installation script subprocess returned error exit status 1
Setting up libfprint0:armhf (1:0.8.2-3) ...
Failed to scan devices: No such file or directory
dpkg: error processing package libfprint0:armhf (--configure):
 installed libfprint0:armhf package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of gvfs-daemons:
 gvfs-daemons depends on udisks2; however:
  Package udisks2 is not configured yet.

dpkg: error processing package gvfs-daemons (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gvfs-backends:
 gvfs-backends depends on gvfs-daemons (= 1.40.1-1ubuntu0.1); however:
  Package gvfs-daemons is not configured yet.

dpkg: error processing package gvfs-backends (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of fprintd:
 fprintd depends on libfprint0 (>= 1:0.4.0); however:
  Package libfprint0:armhf is not configured yet.

dpkg: error processing package fprintd (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-fprintd:armhf:
 libpam-fprintd:armhf depends on fprintd (= 0.8.1-1); however:
  Package fprintd is not configured yet.

dpkg: error processing package libpam-fprintd:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gvfs:armhf:
 gvfs:armhf depends on gvfs-daemons (<< 1.40.1-1ubuntu0.1.1~); however:
  Package gvfs-daemons is not configured yet.
 gvfs:armhf depends on gvfs-daemons (>= 1.40.1-1ubuntu0.1); however:
  Package gvfs-daemons is not configured yet.

dpkg: error processing package gvfs:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gvfs-fuse:
 gvfs-fuse depends on gvfs (= 1.40.1-1ubuntu0.1); however:
  Package gvfs:armhf is not configured yet.

dpkg: error processing package gvfs-fuse (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
Processing triggers for libc-bin (2.29-0ubuntu2) ...
Errors were encountered while processing:
 udisks2
 libfprint0:armhf
 gvfs-daemons
 gvfs-backends
 fprintd
 libpam-fprintd:armhf
 gvfs:armhf
 gvfs-fuse
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@localhost:~#

这里稍微详细一点。我在 Termux 上运行 Ubuntu,安装后可以正常使用。但过了一会儿,这个就出现了。我尝试了在 Google 上能找到的所有方法,也尝试了一些自己的想法。这阻止了我更新和升级或安装 GitHub 上的东西,比如 sherlock,但我无法使用它,因为我需要安装 python-pip,但当我尝试安装任何东西时,我都会收到此错误消息。

root@localhost:~# apt install python-pip
Reading package lists... Done
Building dependency tree
Reading state information... Done
python-pip is already the newest version (18.1-5).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
8 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] Y
E: Setting in Start via TCSAFLUSH for stdin failed! - tcsetattr (13: Permission denied)
Setting up udisks2 (2.8.2-1) ...
Failed to scan devices: No such file or directory
dpkg: error processing package udisks2 (--configure):
 installed udisks2 package post-installation script subprocess returned error exit status 1
Setting up libfprint0:armhf (1:0.8.2-3) ...
Failed to scan devices: No such file or directory
dpkg: error processing package libfprint0:armhf (--configure):
 installed libfprint0:armhf package post-installation script subprocess returned error exit status 1
dpkg: dependency problems prevent configuration of gvfs-daemons:
 gvfs-daemons depends on udisks2; however:
  Package udisks2 is not configured yet.

dpkg: error processing package gvfs-daemons (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gvfs-backends:
 gvfs-backends depends on gvfs-daemons (= 1.40.1-1ubuntu0.1); however:
  Package gvfs-daemons is not configured yet.

dpkg: error processing package gvfs-backends (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of fprintd:
 fprintd depends on libfprint0 (>= 1:0.4.0); however:
  Package libfprint0:armhf is not configured yet.

dpkg: error processing package fprintd (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of libpam-fprintd:armhf:
 libpam-fprintd:armhf depends on fprintd (= 0.8.1-1); however:
  Package fprintd is not configured yet.

dpkg: error processing package libpam-fprintd:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gvfs:armhf:
 gvfs:armhf depends on gvfs-daemons (<< 1.40.1-1ubuntu0.1.1~); however:
  Package gvfs-daemons is not configured yet.
 gvfs:armhf depends on gvfs-daemons (>= 1.40.1-1ubuntu0.1); however:
  Package gvfs-daemons is not configured yet.

dpkg: error processing package gvfs:armhf (--configure):
 dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of gvfs-fuse:
 gvfs-fuse depends on gvfs (= 1.40.1-1ubuntu0.1); however:
  Package gvfs:armhf is not configured yet.

dpkg: error processing package gvfs-fuse (--configure):
 dependency problems - leaving unconfigured
No apport report written because the error message indicates its a followup error from a previous failure.
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
No apport report written because MaxReports is reached already
Processing triggers for libc-bin (2.29-0ubuntu2) ...
Errors were encountered while processing:
 udisks2
 libfprint0:armhf
 gvfs-daemons
 gvfs-backends
 fprintd
 libpam-fprintd:armhf
 gvfs:armhf
 gvfs-fuse
E: Sub-process /usr/bin/dpkg returned an error code (1)
root@localhost:~#

我真的不明白这个问题,因为什么都不起作用

答案1

Termux 适用于 Android 5.0 或更高版本,但以下是Termux wiki 常见问题解答。

On recent Android versions, the write access to the external SD card is done over Storage Access Framework. It is not possible to provide it's API to the command line programs.


There several solutions:

    Use root for putting necessary files to external SD.
    Use custom ROMs. Some of them have disabled SD card access restriction, so you can freely access your external SD card.
    Use a Termux private directory on the external SD card. Usually, it's path should be /storage/XXXX-XXXX/Android/data/com.termux.

与 Linux 的区别

Termux only has a few packages. Can I use the Debian repositories instead?

No, you can't.

There are major differences between Termux and regular Linux distributions, and packages from these repositories won't work. See Differences from Linux for more information.

考虑到所有这些因素,你无法在 Termux 上更新 Ubuntu 软件包也就不足为奇了,因为在 Ubuntu 下更新软件包需要 root 权限,而且促卵泡激素在 Termux 下没有遵循,Ubuntu 软件包系统无法将东西放在需要的地方。

可以通过使用prootTermux 来解决这个问题,但由于 AskUbuntu 是一个专注于 Ubuntu 的网站,因此在我们的姊妹网站上回答有关 Termux 的问题可能会得到更好的结果https://android.stackexchange.com/或者通过查看Termux 维基

资料来源:

https://wiki.termux.com/wiki/FAQ

https://wiki.termux.com/wiki/Differences_from_Linux

如何了解Ubuntu文件系统布局?

相关内容