无法写入日志 (/dev/pts 是否已安装?) - Windows 上的 Ubuntu 中的 openpty?

无法写入日志 (/dev/pts 是否已安装?) - Windows 上的 Ubuntu 中的 openpty?

以 E: 开头的错误消息到底是什么意思?我认为这与 Ubuntu-on-Windows 上的文件结构有关,但具体是什么呢?

The following package was automatically installed and is no longer required:
      os-prober
    Use 'apt-get autoremove' to remove it.
    The following extra packages will be installed:
      libxslt1.1
    The following NEW packages will be installed:
      libxslt1.1 xmlstarlet
    0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 435 kB of archives.
    After this operation, 1023 kB of additional disk space will be used.
    Get:1 http://archive.ubuntu.com/ubuntu/ trusty/main libxslt1.1 amd64 1.1.28-2build1 [145 kB]
    Get:2 http://archive.ubuntu.com/ubuntu/ trusty/universe xmlstarlet amd64 1.5.0-1 [290 kB]
    Fetched 435 kB in 3s (134 kB/s)
    **E: Can not write log (Is /dev/pts mounted?) - openpty (2: No such file or directory)**
    Selecting previously unselected package libxslt1.1:amd64.
    (Reading database ... 28723 files and directories currently installed.)
    Preparing to unpack .../libxslt1.1_1.1.28-2build1_amd64.deb ...
    Unpacking libxslt1.1:amd64 (1.1.28-2build1) ...
    Selecting previously unselected package xmlstarlet.
    Preparing to unpack .../xmlstarlet_1.5.0-1_amd64.deb .

答案1

这意味着 Windows NT Linux 子系统不提供伪终端。在更改的根环境中安装软件包时,人们在原始 Ubuntu/Debian 中遇到同样的错误,因为这些环境尚未/dev填充各种伪终端设备。在 Windows NT Linux 子系统中,它们不存在只是因为操作系统内核没有提供它们。

该消息实际上来自apt-get命令,该dpkg命令正在使用附加到伪终端的标准 I/O 调用该命令。 以下是发生此事件的源代码(该消息在 Ubuntu 16 中略有变化。不过,Windows NT Linux 子系统默认使用早期版本的 Ubuntu。)

进一步阅读

相关内容