win10当前的正式版本的版本号为14393.447,内嵌的Ubuntu为 14.04 LTS,在把他升级到最新版本的时候报错,现将相关的解决办法记录下来。 1、使用apt update出现 W: Failed to fetch http://archive.ubuntu.com/ubuntu/dists/trusty-updates/main/binary-amd64/Packages: Hash Sum mismatch 这样的错误。这个可能是是DNS的问题,于是将DNS设置为阿里公用的DNS。
vi /etc/resolv.conf
# DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 223.5.5.5 nameserver 223.6.6.6 nameserver fec0:0:0:ffff::1
刷新本机DNS缓存:
/etc/init.d/dns-clean start
接着执行 apt update
root@SOFT:/mnt/c/Users/soft/Downloads# apt update
Hit http://security.ubuntu.com trusty-security InRelease
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Ign http://archive.ubuntu.com trusty InRelease
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://archive.ubuntu.com trusty-updates InRelease
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Hit http://archive.ubuntu.com trusty Release.gpg
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Get:1 http://archive.ubuntu.com trusty-updates/main amd64 Packages [918 kB]
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/main Translation-en
Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://archive.ubuntu.com trusty Release
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/multiverse Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://archive.ubuntu.com trusty/universe Translation-en_US
Fetched 918 kB in 20s (44.7 kB/s)
Reading package lists... Done
把所有包升级至 14.04 (trusty) 的最新版
root@SOFT:/mnt/c/Users/soft/Downloads# aptitude update
Hit http://security.ubuntu.com trusty-security InRelease
Hit http://security.ubuntu.com trusty-security/main amd64 Packages
Ign http://archive.ubuntu.com trusty InRelease
Hit http://security.ubuntu.com trusty-security/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty-updates InRelease
Hit http://security.ubuntu.com trusty-security/universe amd64 Packages
Hit http://archive.ubuntu.com trusty Release.gpg
Hit http://security.ubuntu.com trusty-security/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/main amd64 Packages
Hit http://security.ubuntu.com trusty-security/main Translation-en
Hit http://archive.ubuntu.com trusty-updates/restricted amd64 Packages
Hit http://security.ubuntu.com trusty-security/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-updates/universe amd64 Packages
Hit http://archive.ubuntu.com trusty-updates/multiverse amd64 Packages
Hit http://security.ubuntu.com trusty-security/restricted Translation-en
Hit http://security.ubuntu.com trusty-security/universe Translation-en
Hit http://archive.ubuntu.com trusty-updates/main Translation-en
Hit http://archive.ubuntu.com trusty-updates/multiverse Translation-en
Hit http://archive.ubuntu.com trusty-updates/restricted Translation-en
Hit http://archive.ubuntu.com trusty-updates/universe Translation-en
Hit http://archive.ubuntu.com trusty Release
Hit http://archive.ubuntu.com trusty/main amd64 Packages
Hit http://archive.ubuntu.com trusty/restricted amd64 Packages
Hit http://archive.ubuntu.com trusty/universe amd64 Packages
Hit http://archive.ubuntu.com trusty/multiverse amd64 Packages
Hit http://archive.ubuntu.com trusty/main Translation-en
Hit http://archive.ubuntu.com trusty/multiverse Translation-en
Hit http://archive.ubuntu.com trusty/restricted Translation-en
Hit http://archive.ubuntu.com trusty/universe Translation-en
Ign http://archive.ubuntu.com trusty/main Translation-en_US
Ign http://archive.ubuntu.com trusty/multiverse Translation-en_US
Ign http://archive.ubuntu.com trusty/restricted Translation-en_US
Ign http://archive.ubuntu.com trusty/universe Translation-en_US
root@SOFT:/mnt/c/Users/soft/Downloads# aptitude full-upgrade
The following packages will be upgraded:
accountsservice apport apt apt-transport-https apt-utils base-files bash-completion bind9-host cloud-init curl
dbus dnsutils dosfstools dpkg gcc-4.8-base gnupg gpgv initramfs-tools initramfs-tools-bin isc-dhcp-client
isc-dhcp-common klibc-utils libaccountsservice0 libapt-inst1.5 libapt-pkg4.12 libbind9-90 libc-bin libc6 libcurl3
libcurl3-gnutls libdbus-1-3 libdns100 libdrm2 libexpat1 libgcrypt11 libidn11 libisc95 libisccc90 libisccfg90
libklibc libldap-2.4-2 liblwres90 libpam-systemd libpcre3 libpython3.4-minimal libpython3.4-stdlib libssl1.0.0
libstdc++6 libsystemd-daemon0 libsystemd-login0 libtasn1-6 libudev1 libxml2 lsb-base lsb-release
multiarch-support ntpdate openssh-client openssh-server openssh-sftp-server openssl pollinate python3-apport
python3-problem-report python3-update-manager python3.4 python3.4-minimal sudo systemd-services tar tzdata udev
update-manager-core update-notifier-common wget
75 packages upgraded,0 newly installed,0 to remove and 0 not upgraded.
Need to get 24.8 MB of archives. After unpacking 22.5 kB will be used.
Do you want to continue? [Y/n/?] Y
Get: 1 http://archive.ubuntu.com/ubuntu/ trusty-updates/main base-files amd64 7.2ubuntu5.5 [67.5 kB]
Get: 2 http://archive.ubuntu.com/ubuntu/ trusty-updates/main dpkg amd64 1.17.5ubuntu5.7 [1,956 kB]
Get: 3 http://archive.ubuntu.com/ubuntu/ trusty-updates/main tar amd64 1.27.1-1ubuntu0.1 [196 kB]
Get: 4 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libc-bin amd64 2.19-0ubuntu6.9 [1,165 kB]
Get: 5 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libc6 amd64 2.19-0ubuntu6.9 [4,717 kB]
Get: 6 http://archive.ubuntu.com/ubuntu/ trusty-updates/main gcc-4.8-base amd64 4.8.4-2ubuntu1~14.04.3 [16.2 kB]
Get: 7 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libstdc++6 amd64 4.8.4-2ubuntu1~14.04.3 [259 kB]
Get: 8 http://archive.ubuntu.com/ubuntu/ trusty-updates/main libapt-pkg4.12 amd64 1.0.1ubuntu2.15 [638 kB]
Get: 9 http://archive.ubuntu.com/ubuntu/ trusty-updates/main gpgv amd64 1.4.16-1ubuntu2.4 [161 kB]
Get: 10 http://archive.ubuntu.com/ubuntu/ trusty-updates/main gnupg amd64 1.4.16-1ubuntu2.4 [611 kB]
.................
Processing triggers for ureadahead (0.100.0-16) ...
Current status: 0 updates [-75].
更改更新源为 16.04 (xenial) 方法一:修改初始的更新源文件 备份初始的源文件为sources.list.ORIG,将sources.list里的"trusty"全替换为"xenial"。$ sed -i.ORIG 's/trusty/xenial/g' /etc/apt/sources.list # 方法二(推荐):把更新源直接改为国内的阿里云Ubuntu(xenial)镜像,这样会很快 编辑更新源文件 $ vim /etc/apt/sources.list 备份源文件后粘贴如以下代码,并保存退出。
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
如果/etc/apt/sources.list.d/这个文件夹不能空,需要备份下,空的话就不需要备份。
mv /etc/apt/sources.list.d/ /etc/apt/sources.list.d.back/
mkdir /etc/apt/sources.list.d/
升级至 16.04 (xenial) aptitude update aptitude safe-upgrade -y 注1:升级过程中会提示你重启服务(restart services),选yes 注2:还会出现文件冲突,保留当前版本(current version)即可,输入N
root@SOFT:/mnt/c/Users/soft/Downloads# aptitude update
Get: 1 http://mirrors.aliyun.com xenial InRelease [247 kB]
Get: 2 http://mirrors.aliyun.com xenial-security InRelease [94.5 kB]
Get: 3 http://mirrors.aliyun.com xenial-updates InRelease [95.7 kB]
Get: 4 http://mirrors.aliyun.com xenial-proposed InRelease [247 kB]
Get: 5 http://mirrors.aliyun.com xenial-backports InRelease [92.2 kB]
Get: 6 http://mirrors.aliyun.com xenial/main Sources [868 kB]
Get: 7 http://mirrors.aliyun.com xenial/restricted Sources [4,808 B]
Get: 8 http://mirrors.aliyun.com xenial/universe Sources [7,728 kB]
Get: 9 http://mirrors.aliyun.com xenial/multiverse Sources [179 kB]
Get: 10 http://mirrors.aliyun.com xenial/main amd64 Packages [1,201 kB]
Get: 11 http://mirrors.aliyun.com xenial/restricted amd64 Packages [8,344 B]
Get: 12 http://mirrors.aliyun.com xenial/universe amd64 Packages [7,532 kB]
Get: 13 http://mirrors.aliyun.com xenial/multiverse amd64 Packages [144 kB]
Get: 14 http://mirrors.aliyun.com xenial/main Translation-en [568 kB]
Get: 15 http://mirrors.aliyun.com xenial/multiverse Translation-en [106 kB]
Get: 16 http://mirrors.aliyun.com xenial/restricted Translation-en [2,908 B]
Get: 17 http://mirrors.aliyun.com xenial/universe Translation-en [4,354 kB]
Get: 18 http://mirrors.aliyun.com xenial-security/main Sources [45.9 kB]
Get: 19 http://mirrors.aliyun.com xenial-security/restricted Sources [1,804 B]
Get: 20 http://mirrors.aliyun.com xenial-security/universe Sources [13.8 kB]
Get: 21 http://mirrors.aliyun.com xenial-security/multiverse Sources [728 B]
Get: 22 http://mirrors.aliyun.com xenial-security/main amd64 Packages [163 kB]
Get: 23 http://mirrors.aliyun.com xenial-security/restricted amd64 Packages [6,576 B]
Get: 24 http://mirrors.aliyun.com xenial-security/universe amd64 Packages [59.4 kB]
Get: 25 http://mirrors.aliyun.com xenial-security/multiverse amd64 Packages [2,764 B]
Get: 26 http://mirrors.aliyun.com xenial-security/main Translation-en [68.0 kB]
Get: 27 http://mirrors.aliyun.com xenial-security/multiverse Translation-en [1,124 B]
Get: 28 http://mirrors.aliyun.com xenial-security/restricted Translation-en [2,016 B]
Get: 29 http://mirrors.aliyun.com xenial-security/universe Translation-en [33.5 kB]
Get: 30 http://mirrors.aliyun.com xenial-updates/main Sources [206 kB]
Get: 31 http://mirrors.aliyun.com xenial-updates/restricted Sources [1,804 B]
Get: 32 http://mirrors.aliyun.com xenial-updates/universe Sources [109 kB]
Get: 33 http://mirrors.aliyun.com xenial-updates/multiverse Sources [3,648 B]
Get: 34 http://mirrors.aliyun.com xenial-updates/main amd64 Packages [426 kB]
Get: 35 http://mirrors.aliyun.com xenial-updates/restricted amd64 Packages [6,576 B]
Get: 36 http://mirrors.aliyun.com xenial-updates/universe amd64 Packages [362 kB]
Get: 37 http://mirrors.aliyun.com xenial-updates/multiverse amd64 Packages [7,384 B]
Get: 38 http://mirrors.aliyun.com xenial-updates/main Translation-en [164 kB]
Get: 39 http://mirrors.aliyun.com xenial-updates/multiverse Translation-en [2,988 B]
Get: 40 http://mirrors.aliyun.com xenial-updates/restricted Translation-en [2,016 B]
Get: 41 http://mirrors.aliyun.com xenial-updates/universe Translation-en [131 kB]
Get: 42 http://mirrors.aliyun.com xenial-proposed/main Sources [86.6 kB]
Get: 43 http://mirrors.aliyun.com xenial-proposed/restricted Sources [64 B]
Get: 44 http://mirrors.aliyun.com xenial-proposed/universe Sources [33.2 kB]
Get: 45 http://mirrors.aliyun.com xenial-proposed/multiverse Sources [64 B]
Get: 46 http://mirrors.aliyun.com xenial-proposed/main amd64 Packages [113 kB]
Get: 47 http://mirrors.aliyun.com xenial-proposed/restricted amd64 Packages [64 B]
Get: 48 http://mirrors.aliyun.com xenial-proposed/universe amd64 Packages [47.6 kB]
Get: 49 http://mirrors.aliyun.com xenial-proposed/multiverse amd64 Packages [1,460 B]
Get: 50 http://mirrors.aliyun.com xenial-proposed/main Translation-en [39.8 kB]
Get: 51 http://mirrors.aliyun.com xenial-proposed/multiverse Translation-en [752 B]
Get: 52 http://mirrors.aliyun.com xenial-proposed/restricted Translation-en [64 B]
Get: 53 http://mirrors.aliyun.com xenial-proposed/universe Translation-en [17.3 kB]
Get: 54 http://mirrors.aliyun.com xenial-backports/main Sources [3,172 B]
Get: 55 http://mirrors.aliyun.com xenial-backports/restricted Sources [64 B]
Get: 56 http://mirrors.aliyun.com xenial-backports/universe Sources [1,868 B]
Get: 57 http://mirrors.aliyun.com xenial-backports/multiverse Sources [64 B]
Get: 58 http://mirrors.aliyun.com xenial-backports/main amd64 Packages [4,396 B]
Get: 59 http://mirrors.aliyun.com xenial-backports/restricted amd64 Packages [64 B]
Get: 60 http://mirrors.aliyun.com xenial-backports/universe amd64 Packages [2,412 B]
Get: 61 http://mirrors.aliyun.com xenial-backports/multiverse amd64 Packages [64 B]
Get: 62 http://mirrors.aliyun.com xenial-backports/main Translation-en [3,104 B]
Get: 63 http://mirrors.aliyun.com xenial-backports/multiverse Translation-en [64 B]
Get: 64 http://mirrors.aliyun.com xenial-backports/restricted Translation-en [64 B]
Get: 65 http://mirrors.aliyun.com xenial-backports/universe Translation-en [1,216 B]
Fetched 25.6 MB in 31s (814 kB/s)
W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Unknown Multi-Arch type 'no' for package 'libxapian-dev'
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python-cffi-backend-api-min
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package python3-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'kwin'
W: Unknown Multi-Arch type 'no' for package 'kwin-dev'
W: Unknown Multi-Arch type 'no' for package 'kwin-wayland'
W: Unknown Multi-Arch type 'no' for package 'kwin-x11'
W: Unknown Multi-Arch type 'no' for package 'libkf5sysguard-dev'
W: Ignoring Provides line with DepCompareOp for package PHP-psr-http-message-implementation
W: Ignoring Provides line with DepCompareOp for package PHP-psr-log-implementation
W: Ignoring Provides line with DepCompareOp for package PHP-seclib
W: Ignoring Provides line with DepCompareOp for package PHP-sabre-http
W: Ignoring Provides line with DepCompareOp for package PHP-math-biginteger
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: Unknown Multi-Arch type 'no' for package 'compiz-core'
W: Unknown Multi-Arch type 'no' for package 'compiz-gnome'
W: Ignoring Provides line with DepCompareOp for package PHP-math-biginteger
W: Ignoring Provides line with DepCompareOp for package pypy-cffi
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-max
W: Ignoring Provides line with DepCompareOp for package pypy-cffi-backend-api-min
W: You may want to run apt-get update to correct these problems
Current status: 379 updates [+379],15632 new [+15632].
root@SOFT:/mnt/c/Users/soft/Downloads# aptitude safe-upgrade -y
Resolving dependencies...
open: 15828; closed: 24975; defer: 603; conflict: 151 OThe following NEW packages will be installed:
distro-info-data{a} gcc-5-base{a} gcc-6-base{a} libbind9-140{a} libdns-export162{a} libdns162{a} libeatmydata1{a}
libgcrypt20{a} libgmp10{a} libgnutls30{a} libhogweed4{a} libicu55{a} libisc-export160{a} libisc160{a}
libisccc140{a} libisccfg140{a} liblog-message-perl{a} liblwres141{a} libmnl0{a} libnettle6{a} libparted2{a}
libpython3.5{a} libpython3.5-minimal{a} libpython3.5-stdlib{a} librtmp1{a} libsmartcols1{a} libsystemd0{a}
libutempter0{a} libxtables11{a} python-attr{a} python-cffi-backend{a} python-cryptography{a} python-enum34{a}
python-idna{a} python-ipaddress{a} python-pyasn1{a} python-pyasn1-modules{a} python-service-identity{a}
python3-chardet{a} python3-debian{a} python3-pkg-resources{a} python3-requests{a} python3-six{a}
python3-urllib3{a}
The following packages will be upgraded:
把所有包升级至 16.04 (xenial) 的最新版,并重装丢失的aptitude包,最后清理无用包。 apt dist-upgrade apt install aptitude apt autoremove
root@SOFT:/mnt/c/Users/soft/Downloads# apt dist-upgrade
Reading package lists... Done
Building dependency tree
Reading state information... Done
Calculating upgrade... Done
The following package was automatically installed and is no longer required:
libboost-iostreams1.58.0
Use 'apt-get autoremove' to remove it.
The following packages will be REMOVED:
aptitude libasprintf0c2 libpython3.4-minimal libpython3.4-stdlib libxapian22
perl-modules python3.4 python3.4-minimal systemd-services
The following NEW packages will be installed:
cgmanager console-setup-linux init initramfs-tools-core libapt-inst2.0
libapt-pkg5.0 libasprintf0v5 libboost-iostreams1.58.0 libcgi-fast-perl
libcgi-pm-perl libencode-locale-perl libfcgi-perl libfdisk1
libhtml-parser-perl libhtml-tagset-perl libhttp-date-perl
libhttp-message-perl libio-html-perl liblwp-mediatypes-perl liblz4-1
libmpfr4 libmspack0 libperl5.22 libplymouth4 libprocps4 libseccomp2
liburi-perl libxapian-1.3-5 libxapian22v5 linux-base perl-modules-5.22
python3-blinker python3-cffi-backend python3-configobj python3-cryptography
python3-idna python3-jinja2 python3-json-pointer python3-jsonpatch
python3-jwt python3-markupsafe python3-oauthlib python3-prettytable
python3-pyasn1 python3-serial python3-systemd python3-xapian1.3 python3-yaml
python3.5 python3.5-minimal rename systemd systemd-sysv
The following packages will be upgraded:
accountsservice acpid adduser apparmor apport apt apt-transport-https
apt-utils apt-xapian-index aptitude-common at cloud-init console-setup cron
cryptsetup dbus dpkg findutils friendly-recovery gawk gettext-base hostname
ifupdown init-system-helpers initramfs-tools initramfs-tools-bin initscripts
irqbalance keyboard-configuration kmod libaccountsservice0 libapparmor-perl
libcgmanager0 libdbus-1-3 libdbus-glib-1-2 libfreetype6
liblocale-gettext-perl libnewt0.52 libnih-dbus1 libnih1 libpam-systemd
libpython3-stdlib libsub-name-perl libtext-charwidth-perl libtext-iconv-perl
libtext-soundex-perl libudev1 lsb-base mountall open-vm-tools openssh-client
openssh-server openssh-sftp-server os-prober passwd perl perl-base plymouth
plymouth-theme-ubuntu-text pollinate ppp pppconfig procps python-apt
python-xapian python3 python3-apt python3-dbus python3-gdbm python3-gi
python3-minimal python3-newt python3-pycurl resolvconf rsyslog systemd-shim
sysv-rc sysvinit-utils ubuntu-standard udev ufw unattended-upgrades upstart
ureadahead util-linux uuid-runtime
86 upgraded,53 newly installed,9 to remove and 0 not upgraded.
Need to get 33.6 MB of archives.
After this operation,32.1 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
...........
root@SOFT:/mnt/c/Users/soft/Downloads# apt install aptitude
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
libcwidget3v5 libsigc++-2.0-0v5
Suggested packages:
aptitude-doc-en | aptitude-doc debtags libcwidget-dev
The following packages will be REMOVED:
libcwidget3 libsigc++-2.0-0c2a
The following NEW packages will be installed:
aptitude libcwidget3v5 libsigc++-2.0-0v5
0 upgraded,3 newly installed,2 to remove and 0 not upgraded.
Need to get 1,608 kB of archives.
After this operation,4,136 kB of additional disk space will be used.
Do you want to continue? [Y/n] Y
0% [Working]
.............
root@SOFT:/mnt/c/Users/soft/Downloads# apt autoremoveeeee
Reading package lists... Done
Building dependency tree
Reading state information... Done
0 upgraded,0 to remove and 0 not upgraded.
N: Ignoring file '50unattended-upgrades.ucf-dist' in directory '/etc/apt/apt.conf.d/' as it has an invalid filename extension
此时系统Ubuntu子系统升级完毕,你在运行sudo的时候会出现如下提示:
softs@SOFT:/$ sudo apt update sudo: unable to resolve host SOFT sudo: no tty present and no askpass program specified
此后用sudo只能这么用:sudo -S apt update 如果你装错了,或者想退回 Ubuntu 14.04 (trusty),把Linux子系统卸载重装即可:
> lxrun /uninstall /full /y
> lxrun /install
参考:https://www.zhihu.com/question/49411626
https://github.com/Microsoft/BashOnWindows/issues/482