What exactly does the error message beginning with E: mean? I assume it has to do with the file structure on Ubuntu-on-Windows, but what exactly?

The following package was automatically installed and is no longer required:
    Use 'apt-get autoremove' to remove it.
    The following extra packages will be installed:
    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 .

It means that the Windows NT Linux Subsystem does not provide pseudo-terminals. People get this same error in vanilla Ubuntu/Debian when installing packages in changed root environments where /dev hasn't been populated with the various pseudo-terminal devices. In the Windows NT Linux Subsystem's case, they aren't there simply because the operating system kernel isn't supplying them.

The message actually comes from the apt-get command, which is invoking the dpkg command with its standard I/O attached to a pseudo-terminal. Here is the source code for where it happens. (The message has changed slightly in Ubuntu 16. The Windows NT Linux Subsystem uses an earlier version of Ubuntu by default, though.)

Further reading

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.