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

Fre*_*man 1 windows-subsystem-for-linux

以 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 .
Run Code Online (Sandbox Code Playgroud)

Jde*_*eBP 8

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

该消息实际上来自apt-get命令,该dpkg命令通过连接到伪终端的标准 I/O 来调用该命令。 这是它发生的地方的源代码。(该消息在 Ubuntu 16 中略有变化。不过,Windows NT Linux 子系统默认使用早期版本的 Ubuntu。)

进一步阅读