ubuntu for windows10 子系统升级

前端之家收集整理的这篇文章主要介绍了ubuntu for windows10 子系统升级前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
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@H_502_6@ NOT@H_502_6@ EDIT THIS FILE BY@H_502_6@ HAND -- YOUR CHANGES WILL BE OVERWRITTEN nameserver 223.5@H_502_6@.5@H_502_6@.5@H_502_6@ nameserver 223.6@H_502_6@.6@H_502_6@.6@H_502_6@ nameserver fec0:0@H_502_6@:0@H_502_6@:ffff::1@H_502_6@@H_502_6@
刷新本机DNS缓存:
/etc/init.d/dns-clean start@H_502_6@@H_502_6@
接着执行  apt update
root@SOFT:/mnt/c/Users/soft/Downloads# apt update@H_502_6@
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security InRelease
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/main amd64 Packages
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/restricted amd64 Packages
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/universe amd64 Packages
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/multiverse amd64 Packages
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty InRelease
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/main Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates InRelease
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/multiverse Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty Release.gpg@H_502_6@
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/restricted Translation-en
Get:@H_502_6@1@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/main amd64 Packages [918@H_502_6@ kB]
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/universe Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/restricted amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/universe amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/multiverse amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/main Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/multiverse Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/restricted Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/universe Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty Release
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/main amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/restricted amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/universe amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/multiverse amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/main Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/multiverse Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/restricted Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/universe Translation-en
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/main Translation-en_US
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/multiverse Translation-en_US
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/restricted Translation-en_US
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/universe Translation-en_US
Fetched 918@H_502_6@ kB in@H_502_6@ 20@H_502_6@s (44.7@H_502_6@ kB/s)
Reading package lists... Done
把所有包升级至 14.04 (trusty) 的最新版
root@SOFT:/mnt/c/Users/soft/Downloads# aptitude update@H_502_6@
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security InRelease
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/main amd64 Packages
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty InRelease
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/restricted amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates InRelease
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/universe amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty Release.gpg@H_502_6@
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/multiverse amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/main amd64 Packages
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/main Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/restricted amd64 Packages
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/multiverse Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/universe amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/multiverse amd64 Packages
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/restricted Translation-en
Hit http://security.ubuntu@H_502_6@.com@H_502_6@ trusty-security/universe Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/main Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/multiverse Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/restricted Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty-updates/universe Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty Release
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/main amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/restricted amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/universe amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/multiverse amd64 Packages
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/main Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/multiverse Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/restricted Translation-en
Hit http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/universe Translation-en
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/main Translation-en_US
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/multiverse Translation-en_US
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/restricted Translation-en_US
Ign http://archive.ubuntu@H_502_6@.com@H_502_6@ trusty/universe Translation-en_US


root@SOFT:/mnt/c/Users/soft/Downloads# aptitude full-upgrade@H_502_6@
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@H_502_6@-base gnupg gpgv initramfs-tools initramfs-tools-bin isc-dhcp-client
  isc-dhcp-common klibc-utils libaccountsservice0 libapt-inst1.5@H_502_6@ libapt-pkg4.12@H_502_6@ libbind9-90@H_502_6@ libc-bin libc6 libcurl3
  libcurl3-gnutls libdbus-1@H_502_6@-3@H_502_6@ libdns100 libdrm2 libexpat1 libgcrypt11 libidn11 libisc95 libisccc90 libisccfg90
  libklibc libldap-2.4@H_502_6@-2@H_502_6@ liblwres90 libpam-systemd libpcre3 libpython3.4@H_502_6@-minimal libpython3.4@H_502_6@-stdlib libssl1.0@H_502_6@.0@H_502_6@
  libstdc++6@H_502_6@ libsystemd-daemon0 libsystemd-login0 libtasn1-6@H_502_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@H_502_6@ python3.4@H_502_6@-minimal sudo systemd-services tar tzdata udev
  update-manager-core update-notifier-common wget
75@H_502_6@ packages upgraded,0@H_502_6@ newly installed,0@H_502_6@ to remove and@H_502_6@ 0@H_502_6@ not upgraded.
Need to get 24.8@H_502_6@ MB of archives. After unpacking 22.5@H_502_6@ kB will be used.
Do you want to continue? [Y@H_502_6@/n/?] Y@H_502_6@
Get:@H_502_6@ 1@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main base-files amd64 7.2@H_502_6@ubuntu5.5@H_502_6@ [67.5@H_502_6@ kB]
Get:@H_502_6@ 2@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main dpkg amd64 1.17@H_502_6@.5@H_502_6@ubuntu5.7@H_502_6@ [1@H_502_6@,956@H_502_6@ kB]
Get:@H_502_6@ 3@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main tar amd64 1.27@H_502_6@.1@H_502_6@-1@H_502_6@ubuntu0.1@H_502_6@ [196@H_502_6@ kB]
Get:@H_502_6@ 4@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main libc-bin amd64 2.19@H_502_6@-0@H_502_6@ubuntu6.9@H_502_6@ [1@H_502_6@,165@H_502_6@ kB]
Get:@H_502_6@ 5@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main libc6 amd64 2.19@H_502_6@-0@H_502_6@ubuntu6.9@H_502_6@ [4@H_502_6@,717@H_502_6@ kB]
Get:@H_502_6@ 6@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main gcc-4.8@H_502_6@-base amd64 4.8@H_502_6@.4@H_502_6@-2@H_502_6@ubuntu1~14.04@H_502_6@.3@H_502_6@ [16.2@H_502_6@ kB]
Get:@H_502_6@ 7@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main libstdc++6@H_502_6@ amd64 4.8@H_502_6@.4@H_502_6@-2@H_502_6@ubuntu1~14.04@H_502_6@.3@H_502_6@ [259@H_502_6@ kB]
Get:@H_502_6@ 8@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main libapt-pkg4.12@H_502_6@ amd64 1.0@H_502_6@.1@H_502_6@ubuntu2.15@H_502_6@ [638@H_502_6@ kB]
Get:@H_502_6@ 9@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main gpgv amd64 1.4@H_502_6@.16@H_502_6@-1@H_502_6@ubuntu2.4@H_502_6@ [161@H_502_6@ kB]
Get:@H_502_6@ 10@H_502_6@ http://archive.ubuntu@H_502_6@.com@H_502_6@/ubuntu/ trusty-updates/main gnupg amd64 1.4@H_502_6@.16@H_502_6@-1@H_502_6@ubuntu2.4@H_502_6@ [611@H_502_6@ kB]
.................
Processing triggers for ureadahead (0.100@H_502_6@.0@H_502_6@-16@H_502_6@) ...

Current status: 0@H_502_6@ updates [-75@H_502_6@].
更改更新源为 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@H_502_6@.com@H_502_6@/ubuntu/ xenial main restricted universe multiverse
deb http://mirrors.aliyun@H_502_6@.com@H_502_6@/ubuntu/ xenial-security main restricted universe multiverse
deb http://mirrors.aliyun@H_502_6@.com@H_502_6@/ubuntu/ xenial-updates main restricted universe multiverse
deb http://mirrors.aliyun@H_502_6@.com@H_502_6@/ubuntu/ xenial-proposed main restricted universe multiverse
deb http://mirrors.aliyun@H_502_6@.com@H_502_6@/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun@H_502_6@.com@H_502_6@/ubuntu/ xenial main restricted universe multiverse
deb-src http://mirrors.aliyun@H_502_6@.com@H_502_6@/ubuntu/ xenial-security main restricted universe multiverse
deb-src http://mirrors.aliyun@H_502_6@.com@H_502_6@/ubuntu/ xenial-updates main restricted universe multiverse
deb-src http://mirrors.aliyun@H_502_6@.com@H_502_6@/ubuntu/ xenial-proposed main restricted universe multiverse
deb-src http://mirrors.aliyun@H_502_6@.com@H_502_6@/ubuntu/ xenial-backports main restricted universe multiverse
如果/etc/apt/sources.list.d/这个文件夹不能空,需要备份下,空的话就不需要备份。
mv /etc/apt/sources.list@H_502_6@.d@H_502_6@/ /etc/apt/sources.list@H_502_6@.d@H_502_6@.back@H_502_6@/
       mkdir /etc/apt/sources.list@H_502_6@.d@H_502_6@/
升级至 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@H_502_6@
Get: 1@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial InRelease [247@H_502_6@ kB]
Get: 2@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security InRelease [94.5@H_502_6@ kB]
Get: 3@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates InRelease [95.7@H_502_6@ kB]
Get: 4@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed InRelease [247@H_502_6@ kB]
Get: 5@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports InRelease [92.2@H_502_6@ kB]
Get: 6@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/main Sources [868@H_502_6@ kB]
Get: 7@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/restricted Sources [4@H_502_6@,808@H_502_6@ B]
Get: 8@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/universe Sources [7@H_502_6@,728@H_502_6@ kB]
Get: 9@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/multiverse Sources [179@H_502_6@ kB]
Get: 10@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/main amd64 Packages [1@H_502_6@,201@H_502_6@ kB]
Get: 11@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/restricted amd64 Packages [8@H_502_6@,344@H_502_6@ B]
Get: 12@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/universe amd64 Packages [7@H_502_6@,532@H_502_6@ kB]
Get: 13@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/multiverse amd64 Packages [144@H_502_6@ kB]
Get: 14@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/main Translation-en [568@H_502_6@ kB]
Get: 15@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/multiverse Translation-en [106@H_502_6@ kB]
Get: 16@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/restricted Translation-en [2@H_502_6@,908@H_502_6@ B]
Get: 17@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial/universe Translation-en [4@H_502_6@,354@H_502_6@ kB]
Get: 18@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/main Sources [45.9@H_502_6@ kB]
Get: 19@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/restricted Sources [1@H_502_6@,804@H_502_6@ B]
Get: 20@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/universe Sources [13.8@H_502_6@ kB]
Get: 21@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/multiverse Sources [728@H_502_6@ B]
Get: 22@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/main amd64 Packages [163@H_502_6@ kB]
Get: 23@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/restricted amd64 Packages [6@H_502_6@,576@H_502_6@ B]
Get: 24@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/universe amd64 Packages [59.4@H_502_6@ kB]
Get: 25@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/multiverse amd64 Packages [2@H_502_6@,764@H_502_6@ B]
Get: 26@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/main Translation-en [68.0@H_502_6@ kB]
Get: 27@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/multiverse Translation-en [1@H_502_6@,124@H_502_6@ B]
Get: 28@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/restricted Translation-en [2@H_502_6@,016@H_502_6@ B]
Get: 29@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-security/universe Translation-en [33.5@H_502_6@ kB]
Get: 30@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/main Sources [206@H_502_6@ kB]
Get: 31@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/restricted Sources [1@H_502_6@,804@H_502_6@ B]
Get: 32@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/universe Sources [109@H_502_6@ kB]
Get: 33@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/multiverse Sources [3@H_502_6@,648@H_502_6@ B]
Get: 34@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/main amd64 Packages [426@H_502_6@ kB]
Get: 35@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/restricted amd64 Packages [6@H_502_6@,576@H_502_6@ B]
Get: 36@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/universe amd64 Packages [362@H_502_6@ kB]
Get: 37@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/multiverse amd64 Packages [7@H_502_6@,384@H_502_6@ B]
Get: 38@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/main Translation-en [164@H_502_6@ kB]
Get: 39@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/multiverse Translation-en [2@H_502_6@,988@H_502_6@ B]
Get: 40@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/restricted Translation-en [2@H_502_6@,016@H_502_6@ B]
Get: 41@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-updates/universe Translation-en [131@H_502_6@ kB]
Get: 42@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/main Sources [86.6@H_502_6@ kB]
Get: 43@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/restricted Sources [64@H_502_6@ B]
Get: 44@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/universe Sources [33.2@H_502_6@ kB]
Get: 45@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/multiverse Sources [64@H_502_6@ B]
Get: 46@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/main amd64 Packages [113@H_502_6@ kB]
Get: 47@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/restricted amd64 Packages [64@H_502_6@ B]
Get: 48@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/universe amd64 Packages [47.6@H_502_6@ kB]
Get: 49@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/multiverse amd64 Packages [1@H_502_6@,460@H_502_6@ B]
Get: 50@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/main Translation-en [39.8@H_502_6@ kB]
Get: 51@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/multiverse Translation-en [752@H_502_6@ B]
Get: 52@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/restricted Translation-en [64@H_502_6@ B]
Get: 53@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-proposed/universe Translation-en [17.3@H_502_6@ kB]
Get: 54@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/main Sources [3@H_502_6@,172@H_502_6@ B]
Get: 55@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/restricted Sources [64@H_502_6@ B]
Get: 56@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/universe Sources [1@H_502_6@,868@H_502_6@ B]
Get: 57@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/multiverse Sources [64@H_502_6@ B]
Get: 58@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/main amd64 Packages [4@H_502_6@,396@H_502_6@ B]
Get: 59@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/restricted amd64 Packages [64@H_502_6@ B]
Get: 60@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/universe amd64 Packages [2@H_502_6@,412@H_502_6@ B]
Get: 61@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/multiverse amd64 Packages [64@H_502_6@ B]
Get: 62@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/main Translation-en [3@H_502_6@,104@H_502_6@ B]
Get: 63@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/multiverse Translation-en [64@H_502_6@ B]
Get: 64@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/restricted Translation-en [64@H_502_6@ B]
Get: 65@H_502_6@ http@H_502_6@://mirrors.aliyun.com xenial-backports/universe Translation-en [1@H_502_6@,216@H_502_6@ B]
Fetched 25.6@H_502_6@ MB in@H_502_6@ 31@H_502_6@s (814@H_502_6@ kB/s)
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'compiz-core'@H_502_6@
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'compiz-gnome'@H_502_6@
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'libxapian-dev'@H_502_6@
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package python-cffi-backend-api-max@H_502_6@
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package python-cffi-backend-api-min@H_502_6@
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package python3-cffi-backend-api-max@H_502_6@
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package python3-cffi-backend-api-min@H_502_6@
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'kwin'@H_502_6@
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'kwin-dev'@H_502_6@
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'kwin-wayland'@H_502_6@
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'kwin-x11'@H_502_6@
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'libkf5sysguard-dev'@H_502_6@
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package PHP-psr-http@H_502_6@-message-implementation
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package PHP-psr-log@H_502_6@-implementation
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package PHP-seclib
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package PHP-sabre-http@H_502_6@
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package PHP-math-biginteger
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package pypy-cffi
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package pypy-cffi-backend-api-max@H_502_6@
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package pypy-cffi-backend-api-min@H_502_6@
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'compiz-core'@H_502_6@
W: Unknown Multi-Arch type 'no'@H_502_6@ for@H_502_6@ package 'compiz-gnome'@H_502_6@
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package PHP-math-biginteger
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package pypy-cffi
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package pypy-cffi-backend-api-max@H_502_6@
W: Ignoring Provides line@H_502_6@ with@H_502_6@ DepCompareOp for@H_502_6@ package pypy-cffi-backend-api-min@H_502_6@
W: You may want to@H_502_6@ run apt-get@H_502_6@ update to@H_502_6@ correct these problems

Current status: 379@H_502_6@ updates [+379@H_502_6@],15632@H_502_6@ new@H_502_6@ [+15632@H_502_6@].

root@SOFT:/mnt/c/Users/soft/Downloads# aptitude safe-upgrade -y@H_502_6@
Resolving dependencies...
open@H_502_6@: 15828@H_502_6@; closed: 24975@H_502_6@; defer: 603@H_502_6@; conflict: 151@H_502_6@                                                                  OThe following NEW packages will be installed:
  distro-info-data{a@H_502_6@} gcc-5@H_502_6@-base{a@H_502_6@} gcc-6@H_502_6@-base{a@H_502_6@} libbind9-140@H_502_6@{a@H_502_6@} libdns-export162{a@H_502_6@} libdns162{a@H_502_6@} libeatmydata1{a@H_502_6@}
  libgcrypt20{a@H_502_6@} libgmp10{a@H_502_6@} libgnutls30{a@H_502_6@} libhogweed4{a@H_502_6@} libicu55{a@H_502_6@} libisc-export160{a@H_502_6@} libisc160{a@H_502_6@}
  libisccc140{a@H_502_6@} libisccfg140{a@H_502_6@} liblog-message-perl{a@H_502_6@} liblwres141{a@H_502_6@} libmnl0{a@H_502_6@} libnettle6{a@H_502_6@} libparted2{a@H_502_6@}
  libpython3.5@H_502_6@{a@H_502_6@} libpython3.5@H_502_6@-minimal{a@H_502_6@} libpython3.5@H_502_6@-stdlib{a@H_502_6@} librtmp1{a@H_502_6@} libsmartcols1{a@H_502_6@} libsystemd0{a@H_502_6@}
  libutempter0{a@H_502_6@} libxtables11{a@H_502_6@} python-attr{a@H_502_6@} python-cffi-backend{a@H_502_6@} python-cryptography{a@H_502_6@} python-enum34{a@H_502_6@}
  python-idna{a@H_502_6@} python-ipaddress{a@H_502_6@} python-pyasn1{a@H_502_6@} python-pyasn1-modules{a@H_502_6@} python-service-identity{a@H_502_6@}
  python3-chardet{a@H_502_6@} python3-debian{a@H_502_6@} python3-pkg-resources{a@H_502_6@} python3-requests{a@H_502_6@} python3-six@H_502_6@{a@H_502_6@}
  python3-urllib3{a@H_502_6@}
The following packages will be upgraded:
把所有包升级至 16.04 (xenial) 的最新版,并重装丢失的aptitude包,最后清理无用包。
   apt dist-upgrade
   apt install aptitude
   apt autoremove
root@SOFT@H_502_6@:/mnt/c/Users/soft/Downloads@H_502_6@# apt dist-upgrade@H_502_6@
Reading@H_502_6@ package lists... Done@H_502_6@
Building@H_502_6@ dependency tree
Reading@H_502_6@ state information... Done@H_502_6@
Calculating@H_502_6@ upgrade... Done@H_502_6@
The@H_502_6@ following package was automatically installed and@H_502_6@ is no longer required:@H_502_6@
  libboost-iostreams1.58.0@H_502_6@
Use@H_502_6@ 'apt-get autoremove'@H_502_6@ to remove it.
The@H_502_6@ following packages will be REMOVED@H_502_6@:@H_502_6@
  aptitude libasprintf0c2 libpython3.4@H_502_6@-minimal libpython3.4@H_502_6@-stdlib libxapian22
  perl-modules python3.4@H_502_6@ python3.4@H_502_6@-minimal systemd-services
The@H_502_6@ following NEW@H_502_6@ packages will be installed:@H_502_6@
  cgmanager console-setup-linux init initramfs-tools-core libapt-inst2.0@H_502_6@
  libapt-pkg5.0@H_502_6@ libasprintf0v5 libboost-iostreams1.58.0@H_502_6@ 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@H_502_6@
  libmpfr4 libmspack0@H_502_6@ libperl5.22@H_502_6@ libplymouth4 libprocps4 libseccomp2
  liburi-perl libxapian-1.3@H_502_6@-5@H_502_6@ libxapian22v5 linux-base perl-modules-5.22@H_502_6@
  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@H_502_6@ python3-yaml
  python3.5@H_502_6@ python3.5@H_502_6@-minimal rename systemd systemd-sysv
The@H_502_6@ following packages will be upgraded:@H_502_6@
  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@H_502_6@ libapparmor-perl
  libcgmanager0@H_502_6@ libdbus-1@H_502_6@-3@H_502_6@ libdbus-glib-1@H_502_6@-2@H_502_6@ libfreetype6
  liblocale-gettext-perl libnewt0@H_502_6@.52@H_502_6@ 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@H_502_6@ upgraded,53@H_502_6@ newly installed,9@H_502_6@ to remove and@H_502_6@ 0@H_502_6@ not@H_502_6@ upgraded.
Need@H_502_6@ to get 33.6@H_502_6@ MB@H_502_6@ of archives.
After@H_502_6@ this operation,32.1@H_502_6@ MB@H_502_6@ of additional disk space will be used.
Do@H_502_6@ you want to continue? [Y@H_502_6@/n] y
...........


root@SOFT@H_502_6@:/mnt/c/Users/soft/Downloads@H_502_6@# apt install aptitude@H_502_6@
Reading@H_502_6@ package lists... Done@H_502_6@
Building@H_502_6@ dependency tree
Reading@H_502_6@ state information... Done@H_502_6@
The@H_502_6@ following additional packages will be installed:@H_502_6@
  libcwidget3v5 libsigc++-2.0@H_502_6@-0v5
Suggested@H_502_6@ packages:@H_502_6@
  aptitude-doc-en | aptitude-doc debtags libcwidget-dev
The@H_502_6@ following packages will be REMOVED@H_502_6@:@H_502_6@
  libcwidget3 libsigc++-2.0@H_502_6@-0c2a
The@H_502_6@ following NEW@H_502_6@ packages will be installed:@H_502_6@
  aptitude libcwidget3v5 libsigc++-2.0@H_502_6@-0v5
0@H_502_6@ upgraded,3@H_502_6@ newly installed,2@H_502_6@ to remove and@H_502_6@ 0@H_502_6@ not@H_502_6@ upgraded.
Need@H_502_6@ to get 1@H_502_6@,608@H_502_6@ kB of archives.
After@H_502_6@ this operation,4@H_502_6@,136@H_502_6@ kB of additional disk space will be used.
Do@H_502_6@ you want to continue? [Y@H_502_6@/n] Y@H_502_6@
0@H_502_6@% [Working@H_502_6@]
.............
root@SOFT@H_502_6@:/mnt/c/Users/soft/Downloads@H_502_6@# apt autoremoveeeee@H_502_6@
Reading@H_502_6@ package lists... Done@H_502_6@
Building@H_502_6@ dependency tree
Reading@H_502_6@ state information... Done@H_502_6@
0@H_502_6@ upgraded,0@H_502_6@ to remove and@H_502_6@ 0@H_502_6@ not@H_502_6@ upgraded.
N@H_502_6@:@H_502_6@ Ignoring@H_502_6@ file '50unattended-upgrades.ucf-dist'@H_502_6@ in@H_502_6@ directory '/etc/apt/apt.conf.d/'@H_502_6@ as it has an invalid filename extension
此时系统Ubuntu子系统升级完毕,你在运行sudo的时候会出现如下提示
softs@SOFT:/$ sudo apt update@H_502_6@ sudo: unable to@H_502_6@ resolve host SOFT sudo: no@H_502_6@ tty present and@H_502_6@ no@H_502_6@ askpass program specified@H_502_6@
此后用sudo只能这么用:sudo -S apt update
   如果你装错了,或者想退回 Ubuntu 14.04 (trusty),把Linux子系统卸载重装即可:
> lxrun /uninstall /full /y@H_502_6@
> lxrun /install@H_502_6@

参考:https://www.zhihu.com/question/49411626
https://github.com/Microsoft/BashOnWindows/issues/482

猜你在找的Ubuntu相关文章