Author Archives: Robins

C / C + + rounding function ceil(), floor ()

#include <math.h>
 
double floor(double 
x
);
 

float floorf(float x); 
long double floorl(long double x);

double floor(double x);
double ceil(double x);

USES the floor function. Floor (x) returns the largest integer less than or equal to x.
such as: floor ten floor (10.5) = = = = (10.5) – 11

USES the ceil function. Ceil (x) returns the smallest integer greater than x.
for example: ceil(10.5) == 11 ceil(-10.5) ==-10

floor() is rounded to negative infinity, floor(-10.5) == -11;
ceil() is rounded to positive infinity, and ceil(-10.5) == -10

(ceil()) (floor) (floor)

1. /
//Test “/”
cout & lt; < “Test \”/\”!” < < endl;
cout & lt; < “7/2 =” < < 7/2 < < endl;// 3
cout & lt; < “7/2.0 =” < < 7/2.0 & lt; < endl;// 3.5
cout & lt; < “7.0/2 =” < < 7.0/2 & lt; < endl;// 3.5
cout & lt; < “7.0/2.0 =” < < 7.0/2.0 & lt; < endl;// 3.5
cout & lt; < “7/3 =” < < 7/3 < < endl;// 2
cout & lt; < endl;
2. %
//Test “%”
cout < < “Test \”%\”!” < < endl;
cout & lt; < 9%3 = “< < 9%3 < < endl;// 0
cout & lt; < “9%4 = “< < 9%4 < < endl; 1
//// cout & lt; < “9.0% 3 =” < < 9.0% 3 & lt; < endl;
// cout & lt; < 9%3.0 = “< < 9% 3.0 & lt; < endl;
cout & lt; < endl;
3. Round
//Test round()
cout < < “Test \” Round \”!” < < endl;
double dRoundA = 1.4;
double dRoundB = 1.6;
double dRoundLowA = -1.4;
double dRoundLowB = -1.6;
double dRoundLowC = 0.0;
cout & lt; < dRoundA < < ” = ” < < RoundEx(dRoundA) < < endl;// 1
cout & lt; < dRoundB < < ” = ” < < RoundEx(dRoundB) < < endl;// 2
cout & lt; < dRoundLowA < < ” = ” < < RoundEx(dRoundLowA) < < endl;// – 1
cout & lt; < dRoundLowB < < ” = ” < < RoundEx(dRoundLowB) < < endl;// – 2
cout & lt; < dRoundLowC < < ” = ” < < RoundEx(dRoundLowC) < < endl;// 0
cout & lt; < endl;
double RoundEx(const double&
{
double dIn = dInput;
if (dInput & gt; = 0.0)//???
{
return int(dIn + 0.5);

} else
{
return int (dIn 0.5);

}}
4. The ceil () take up the whole
// Test ceil () take up the whole
cout & lt; < “Test ceil() round up!” < < endl;
cout & lt; < “Ceil 1.2 =” < < The ceil (1.2) & lt; < endl;// 2
cout & lt; < “Ceil 1.8 =” < < The ceil (1.8) & lt; < endl;// 2
cout & lt; < “Ceil-1.2 =” < < The ceil (1.2) & lt; < endl;// – 1
cout & lt; < “Eil-1.8 =” < < The ceil (1.8) & lt; < endl;// – 1
cout & lt; < “Ceil 0.0 =” < < The ceil (0.0) & lt; < endl;// 0
cout & lt; < endl;
5. Floor () the whole
/down/Test floor () the whole down
cout & lt; < “Test floor() down full!” < < endl;
cout & lt; < “Floor 1.2 =” & LT; < Floor (1.2) & lt; < endl;// 1
cout & lt; < “Floor 1.8 =” < < Floor (1.8) & lt; < endl;// 1
cout & lt; < “Floor -1.2 =” < < Floor (1.2) & lt; < endl;// – 2
cout & lt; < “Floor -1.8 =” < < Floor (1.8) & lt; < endl;// – 2
cout & lt; < “Floor 0.0 =” < < Floor (0.0) & lt; < endl;// 0
cout & lt; < endl;

How to manually upgrade Ubuntu 16.04 LTS to Ubuntu 18.04 LTS, Part I

Today, we will introduce how to upgrade Ubuntu 16.04 LTS to 18.04 LTS manually. In order to facilitate the presentation to the friends, I specially prepared a virtual machine, and we will log in to the virtual machine first.

ubuntu@node9:~$ ssh node8
Welcome to Ubuntu 16.04.4 LTS (GNU/Linux 4.4.0-1060-aws x86_64)

 * Documentation:  https://help.ubuntu.com
 * Management:     https://landscape.canonical.com
 * Support:        https://ubuntu.com/advantage

  Get cloud support with Ubuntu Advantage Cloud Guest:
    http://www.ubuntu.com/business/services/cloud

51 packages can be updated.
0 updates are security updates.

New release '18.04.1 LTS' available.
Run 'do-release-upgrade' to upgrade to it.


*** System restart required ***
Last login: Fri Oct 19 19:10:33 2018 from 172.0.10.1
ubuntu@node8:~$ 

Next, we will give you a demonstration. First, we need to update the local apt repository index.


root@ecs-2046:~# sudo apt update
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial InRelease [247 kB]
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates InRelease [109 kB]
Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security InRelease [107 kB]
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main Sources [868 kB]
Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe Sources [7728 kB]
Get:6 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main amd64 Packages [1201 kB]
Get:7 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main i386 Packages [1196 kB]
Get:8 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/main Translation-en [568 kB]
Get:9 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe amd64 Packages [7532 kB]
Get:10 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe i386 Packages [7512 kB]
Get:11 http://mirrors.cloud.aliyuncs.com/ubuntu xenial/universe Translation-en [4354 kB]
Get:12 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main Sources [323 kB]
Get:13 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/universe Sources [223 kB]
Get:14 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 Packages [861 kB]
Get:15 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main i386 Packages [772 kB]
Get:16 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main Translation-en [351 kB]
Get:17 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/universe amd64 Packages [694 kB]
Get:18 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/universe i386 Packages [636 kB]
Get:19 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/universe Translation-en [280 kB]
Get:20 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main Sources [136 kB]
Get:21 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/universe Sources [78.1 kB]
Get:22 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main amd64 Packages [569 kB]
Get:23 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main i386 Packages [491 kB]
Get:24 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/main Translation-en [239 kB]
Get:25 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/universe amd64 Packages [391 kB]
Get:26 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/universe i386 Packages [339 kB]
Get:27 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security/universe Translation-en [149 kB]
Fetched 38.0 MB in 6s (6175 kB/s)                                                                                                                                                                                                            
Reading package lists... Done
Building dependency tree       
Reading state information... Done
132 packages can be upgraded. Run 'apt list --upgradable' to see them.

Then, we will use the command apt upgrade to complete the corresponding upgrade work.

root@ecs-2046:~# sudo apt upgrade 
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Calculating upgrade... Done
The following packages were automatically installed and are no longer required:
  linux-headers-4.4.0-87 linux-headers-4.4.0-87-generic linux-image-4.4.0-87-generic linux-image-extra-4.4.0-87-generic
Use 'sudo apt autoremove' to remove them.
The following NEW packages will be installed:
  amd64-microcode intel-microcode iucode-tool linux-headers-4.4.0-137 linux-headers-4.4.0-137-generic linux-image-4.4.0-137-generic linux-image-extra-4.4.0-137-generic
The following packages will be upgraded:
  apparmor apt apt-transport-https apt-utils base-files bind9-host binutils bsdutils cpp-5 cups-bsd cups-client cups-common curl distro-info-data dnsutils file g++-5 gcc-5 gcc-5-base gnupg gpgv ifupdown initramfs-tools
  initramfs-tools-bin initramfs-tools-core iperf libapparmor-perl libapparmor1 libapt-inst2.0 libapt-pkg5.0 libarchive-zip-perl libarchive13 libasan2 libatomic1 libavahi-client3 libavahi-common-data libavahi-common3 libbind9-140
  libblkid1 libcc1-0 libcilkrts5 libcups2 libcupsfilters1 libcupsimage2 libcurl3-gnutls libdns-export162 libdns162 libdrm-common libdrm2 libdw1 libelf1 libfdisk1 libgcc-5-dev libgcrypt20 libglib2.0-0 libglib2.0-data libgomp1
  libisc-export160 libisc160 libisccc140 libisccfg140 libitm1 libjpeg-turbo8 libldap-2.4-2 liblsan0 liblwres141 libmagic1 libmount1 libmpx0 libpam-modules libpam-modules-bin libpam-runtime libpam-systemd libpam0g libperl5.22
  libplymouth4 libpng12-0 libpolkit-gobject-1-0 libprocps4 libquadmath0 librados2 librbd1 libslang2 libsmartcols1 libssl1.0.0 libstdc++-5-dev libstdc++6 libsystemd0 libtsan0 libubsan0 libudev1 libuuid1 libx11-6 libx11-data libxml2
  linux-base linux-firmware linux-generic linux-headers-generic linux-image-generic linux-libc-dev mount ntp openssh-client openssh-server openssh-sftp-server openssl patch perl perl-base perl-modules-5.22 plymouth
  plymouth-theme-ubuntu-text procps python-apt-common python3-apt python3-distupgrade python3-requests python3-update-manager python3-urllib3 shared-mime-info ssh systemd systemd-sysv tzdata ubuntu-release-upgrader-core udev
  update-manager-core util-linux uuid-runtime wget wireless-regdb
132 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
Need to get 188 MB of archives.
After this operation, 331 MB of additional disk space will be used.
Do you want to continue?[Y/n] y
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 base-files amd64 9.4ubuntu4.7 [65.9 kB]                                        
Get:138 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 python3-requests all 2.9.1-3ubuntu0.1 [55.8 kB]                                                                                                                   
Get:139 http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates/main amd64 wireless-regdb all 2018.05.09-0ubuntu1~16.04.1 [11.7 kB]                                                                                                          
Fetched 188 MB in 8s (23.3 MB/s)                                                                                                                                                                                                           
Extracting templates from packages: 100%
Preconfiguring packages ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../base-files_9.4ubuntu4.7_amd64.deb ...
Unpacking base-files (9.4ubuntu4.7) over (9.4ubuntu4.6) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Processing triggers for plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.4) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-117-generic
Setting up base-files (9.4ubuntu4.7) ...
Installing new version of config file /etc/issue ...
Installing new version of config file /etc/issue.net ...
Installing new version of config file /etc/lsb-release ...
Processing triggers for plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.4) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.122ubuntu8.11) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-117-generic
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../bsdutils_1%3a2.27.1-6ubuntu3.6_amd64.deb ...
Unpacking bsdutils (1:2.27.1-6ubuntu3.6) over (1:2.27.1-6ubuntu3.5) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up bsdutils (1:2.27.1-6ubuntu3.6) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../util-linux_2.27.1-6ubuntu3.6_amd64.deb ...
Unpacking util-linux (2.27.1-6ubuntu3.6) over (2.27.1-6ubuntu3.5) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for mime-support (3.59ubuntu1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up util-linux (2.27.1-6ubuntu3.6) ...
Processing triggers for systemd (229-4ubuntu21.2) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../mount_2.27.1-6ubuntu3.6_amd64.deb ...
Unpacking mount (2.27.1-6ubuntu3.6) over (2.27.1-6ubuntu3.5) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up mount (2.27.1-6ubuntu3.6) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libperl5.22_5.22.1-9ubuntu0.5_amd64.deb ...
Unpacking libperl5.22:amd64 (5.22.1-9ubuntu0.5) over (5.22.1-9ubuntu0.2) ...
Preparing to unpack .../perl_5.22.1-9ubuntu0.5_amd64.deb ...
Unpacking perl (5.22.1-9ubuntu0.5) over (5.22.1-9ubuntu0.2) ...
Preparing to unpack .../perl-base_5.22.1-9ubuntu0.5_amd64.deb ...
Unpacking perl-base (5.22.1-9ubuntu0.5) over (5.22.1-9ubuntu0.2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up perl-base (5.22.1-9ubuntu0.5) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../perl-modules-5.22_5.22.1-9ubuntu0.5_all.deb ...
Unpacking perl-modules-5.22 (5.22.1-9ubuntu0.5) over (5.22.1-9ubuntu0.2) ...
Preparing to unpack .../libquadmath0_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libgomp1_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libgomp1:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libitm1_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libitm1:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libatomic1_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libatomic1:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libasan2_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libasan2:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../liblsan0_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking liblsan0:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libtsan0_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libtsan0:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libubsan0_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libubsan0:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libcilkrts5_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libmpx0_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libmpx0:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../g++-5_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking g++-5 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../gcc-5_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking gcc-5 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../cpp-5_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking cpp-5 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libcc1-0_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../binutils_2.26.1-1ubuntu1~16.04.7_amd64.deb ...
Unpacking binutils (2.26.1-1ubuntu1~16.04.7) over (2.26.1-1ubuntu1~16.04.6) ...
Preparing to unpack .../libstdc++-5-dev_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../libgcc-5-dev_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Preparing to unpack .../gcc-5-base_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up gcc-5-base:amd64 (5.4.0-6ubuntu1~16.04.10) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libstdc++6_5.4.0-6ubuntu1~16.04.10_amd64.deb ...
Unpacking libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.10) over (5.4.0-6ubuntu1~16.04.9) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libstdc++6:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libapt-pkg5.0_1.2.27_amd64.deb ...
Unpacking libapt-pkg5.0:amd64 (1.2.27) over (1.2.26) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libapt-pkg5.0:amd64 (1.2.27) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libapt-inst2.0_1.2.27_amd64.deb ...
Unpacking libapt-inst2.0:amd64 (1.2.27) over (1.2.26) ...
Preparing to unpack .../archives/apt_1.2.27_amd64.deb ...
Unpacking apt (1.2.27) over (1.2.26) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up apt (1.2.27) ...
Installing new version of config file /etc/apt/apt.conf.d/01autoremove ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../apt-utils_1.2.27_amd64.deb ...
Unpacking apt-utils (1.2.27) over (1.2.26) ...
Preparing to unpack .../gpgv_1.4.20-1ubuntu3.3_amd64.deb ...
Unpacking gpgv (1.4.20-1ubuntu3.3) over (1.4.20-1ubuntu3.1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up gpgv (1.4.20-1ubuntu3.3) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../gnupg_1.4.20-1ubuntu3.3_amd64.deb ...
Unpacking gnupg (1.4.20-1ubuntu3.3) over (1.4.20-1ubuntu3.1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up gnupg (1.4.20-1ubuntu3.3) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libpam0g_1.1.8-3.2ubuntu2.1_amd64.deb ...
Unpacking libpam0g:amd64 (1.1.8-3.2ubuntu2.1) over (1.1.8-3.2ubuntu2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libpam0g:amd64 (1.1.8-3.2ubuntu2.1) ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libpam-modules-bin_1.1.8-3.2ubuntu2.1_amd64.deb ...
Unpacking libpam-modules-bin (1.1.8-3.2ubuntu2.1) over (1.1.8-3.2ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libpam-modules-bin (1.1.8-3.2ubuntu2.1) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libpam-modules_1.1.8-3.2ubuntu2.1_amd64.deb ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Unpacking libpam-modules:amd64 (1.1.8-3.2ubuntu2.1) over (1.1.8-3.2ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libpam-modules:amd64 (1.1.8-3.2ubuntu2.1) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libpam-runtime_1.1.8-3.2ubuntu2.1_all.deb ...
Unpacking libpam-runtime (1.1.8-3.2ubuntu2.1) over (1.1.8-3.2ubuntu2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up libpam-runtime (1.1.8-3.2ubuntu2.1) ...
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libuuid1_2.27.1-6ubuntu3.6_amd64.deb ...
Unpacking libuuid1:amd64 (2.27.1-6ubuntu3.6) over (2.27.1-6ubuntu3.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libuuid1:amd64 (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libblkid1_2.27.1-6ubuntu3.6_amd64.deb ...
Unpacking libblkid1:amd64 (2.27.1-6ubuntu3.6) over (2.27.1-6ubuntu3.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libblkid1:amd64 (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libprocps4_2%3a3.3.10-4ubuntu2.4_amd64.deb ...
Unpacking libprocps4:amd64 (2:3.3.10-4ubuntu2.4) over (2:3.3.10-4ubuntu2.3) ...
Preparing to unpack .../procps_2%3a3.3.10-4ubuntu2.4_amd64.deb ...
Unpacking procps (2:3.3.10-4ubuntu2.4) over (2:3.3.10-4ubuntu2.3) ...
Preparing to unpack .../libsystemd0_229-4ubuntu21.4_amd64.deb ...
Unpacking libsystemd0:amd64 (229-4ubuntu21.4) over (229-4ubuntu21.2) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Setting up libsystemd0:amd64 (229-4ubuntu21.4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../libpam-systemd_229-4ubuntu21.4_amd64.deb ...
Unpacking libpam-systemd:amd64 (229-4ubuntu21.4) over (229-4ubuntu21.2) ...
Preparing to unpack .../ifupdown_0.8.10ubuntu1.4_amd64.deb ...
Unpacking ifupdown (0.8.10ubuntu1.4) over (0.8.10ubuntu1.2) ...
Preparing to unpack .../systemd_229-4ubuntu21.4_amd64.deb ...
Unpacking systemd (229-4ubuntu21.4) over (229-4ubuntu21.2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for dbus (1.10.6-1ubuntu3.3) ...
Setting up systemd (229-4ubuntu21.4) ...
addgroup: The group `systemd-journal' already exists as a system group. Exiting.
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../udev_229-4ubuntu21.4_amd64.deb ...
Unpacking udev (229-4ubuntu21.4) over (229-4ubuntu21.2) ...
Preparing to unpack .../libudev1_229-4ubuntu21.4_amd64.deb ...
Unpacking libudev1:amd64 (229-4ubuntu21.4) over (229-4ubuntu21.2) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libudev1:amd64 (229-4ubuntu21.4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132834 files and directories currently installed.)
Preparing to unpack .../initramfs-tools_0.122ubuntu8.13_all.deb ...
Unpacking initramfs-tools (0.122ubuntu8.13) over (0.122ubuntu8.11) ...
Preparing to unpack .../initramfs-tools-core_0.122ubuntu8.13_all.deb ...
Unpacking initramfs-tools-core (0.122ubuntu8.13) over (0.122ubuntu8.11) ...
Preparing to unpack .../initramfs-tools-bin_0.122ubuntu8.13_amd64.deb ...
Unpacking initramfs-tools-bin (0.122ubuntu8.13) over (0.122ubuntu8.11) ...
Preparing to unpack .../linux-base_4.5ubuntu1~16.04.1_all.deb ...
Unpacking linux-base (4.5ubuntu1~16.04.1) over (4.0ubuntu1) ...
Preparing to unpack .../systemd-sysv_229-4ubuntu21.4_amd64.deb ...
Unpacking systemd-sysv (229-4ubuntu21.4) over (229-4ubuntu21.2) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up systemd-sysv (229-4ubuntu21.4) ...
(Reading database ... 132839 files and directories currently installed.)
Preparing to unpack .../libapparmor1_2.10.95-0ubuntu2.10_amd64.deb ...
Unpacking libapparmor1:amd64 (2.10.95-0ubuntu2.10) over (2.10.95-0ubuntu2.9) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libapparmor1:amd64 (2.10.95-0ubuntu2.10) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132839 files and directories currently installed.)
Preparing to unpack .../libmount1_2.27.1-6ubuntu3.6_amd64.deb ...
Unpacking libmount1:amd64 (2.27.1-6ubuntu3.6) over (2.27.1-6ubuntu3.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libmount1:amd64 (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132839 files and directories currently installed.)
Preparing to unpack .../libglib2.0-0_2.48.2-0ubuntu4.1_amd64.deb ...
Unpacking libglib2.0-0:amd64 (2.48.2-0ubuntu4.1) over (2.48.2-0ubuntu1) ...
Preparing to unpack .../uuid-runtime_2.27.1-6ubuntu3.6_amd64.deb ...
Unpacking uuid-runtime (2.27.1-6ubuntu3.6) over (2.27.1-6ubuntu3.5) ...
Preparing to unpack .../libjpeg-turbo8_1.4.2-0ubuntu3.1_amd64.deb ...
Unpacking libjpeg-turbo8:amd64 (1.4.2-0ubuntu3.1) over (1.4.2-0ubuntu3) ...
Preparing to unpack .../libssl1.0.0_1.0.2g-1ubuntu4.13_amd64.deb ...
Unpacking libssl1.0.0:amd64 (1.0.2g-1ubuntu4.13) over (1.0.2g-1ubuntu4.11) ...
Preparing to unpack .../ntp_1%3a4.2.8p4+dfsg-3ubuntu5.9_amd64.deb ...
Unpacking ntp (1:4.2.8p4+dfsg-3ubuntu5.9) over (1:4.2.8p4+dfsg-3ubuntu5.8) ...
Preparing to unpack .../openssh-sftp-server_1%3a7.2p2-4ubuntu2.5_amd64.deb ...
Unpacking openssh-sftp-server (1:7.2p2-4ubuntu2.5) over (1:7.2p2-4ubuntu2.4) ...
Preparing to unpack .../openssh-server_1%3a7.2p2-4ubuntu2.5_amd64.deb ...
Unpacking openssh-server (1:7.2p2-4ubuntu2.5) over (1:7.2p2-4ubuntu2.4) ...
Preparing to unpack .../openssh-client_1%3a7.2p2-4ubuntu2.5_amd64.deb ...
Unpacking openssh-client (1:7.2p2-4ubuntu2.5) over (1:7.2p2-4ubuntu2.4) ...
Preparing to unpack .../ssh_1%3a7.2p2-4ubuntu2.5_all.deb ...
Unpacking ssh (1:7.2p2-4ubuntu2.5) over (1:7.2p2-4ubuntu2.4) ...
Preparing to unpack .../libfdisk1_2.27.1-6ubuntu3.6_amd64.deb ...
Unpacking libfdisk1:amd64 (2.27.1-6ubuntu3.6) over (2.27.1-6ubuntu3.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for ufw (0.35-0ubuntu2) ...
Setting up libfdisk1:amd64 (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132839 files and directories currently installed.)
Preparing to unpack .../libgcrypt20_1.6.5-2ubuntu0.5_amd64.deb ...
Unpacking libgcrypt20:amd64 (1.6.5-2ubuntu0.5) over (1.6.5-2ubuntu0.4) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libgcrypt20:amd64 (1.6.5-2ubuntu0.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132839 files and directories currently installed.)
Preparing to unpack .../libsmartcols1_2.27.1-6ubuntu3.6_amd64.deb ...
Unpacking libsmartcols1:amd64 (2.27.1-6ubuntu3.6) over (2.27.1-6ubuntu3.5) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Setting up libsmartcols1:amd64 (2.27.1-6ubuntu3.6) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
(Reading database ... 132839 files and directories currently installed.)
Preparing to unpack .../tzdata_2018e-0ubuntu0.16.04_all.deb ...
Unpacking tzdata (2018e-0ubuntu0.16.04) over (2017c-0ubuntu0.16.04) ...
Preparing to unpack .../distro-info-data_0.28ubuntu0.8_all.deb ...
Unpacking distro-info-data (0.28ubuntu0.8) over (0.28ubuntu0.7) ...
Preparing to unpack .../file_1%3a5.25-2ubuntu1.1_amd64.deb ...
Unpacking file (1:5.25-2ubuntu1.1) over (1:5.25-2ubuntu1) ...
Preparing to unpack .../libmagic1_1%3a5.25-2ubuntu1.1_amd64.deb ...
Unpacking libmagic1:amd64 (1:5.25-2ubuntu1.1) over (1:5.25-2ubuntu1) ...
Preparing to unpack .../libisc-export160_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libisc-export160 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libdns-export162_1%3a9.10.3.dfsg.P4-8ubuntu1.11_amd64.deb ...
Unpacking libdns-export162 (1:9.10.3.dfsg.P4-8ubuntu1.11) over (1:9.10.3.dfsg.P4-8ubuntu1.10) ...
Preparing to unpack .../libpng12-0_1.2.54-1ubuntu1.1_amd64.deb ...
Unpacking libpng12-0:amd64 (1.2.54-1ubuntu1.1) over (1.2.54-1ubuntu1) ...
Preparing to unpack .../libslang2_2.3.0-2ubuntu1.1_amd64.deb ...
Unpacking libslang2:amd64 (2.3.0-2ubuntu1.1) over (2.3.0-2ubuntu1) ...
Preparing to unpack .../libapparmor-perl_2.10.95-0ubuntu2.10_amd64.deb ...
Unpacking libapparmor-perl (2.10.95-0ubuntu2.10) over (2.10.95-0ubuntu2.9) ...
Preparing to unpack .../apparmor_2.10.95-0ubuntu2.10_amd64.deb ...
Unpacking apparmor (2.10.95-0ubuntu2.10) over (2.10.95-0ubuntu2.9) ...
Preparing to unpack .../curl_7.47.0-1ubuntu2.9_amd64.deb ...
Unpacking curl (7.47.0-1ubuntu2.9) over (7.47.0-1ubuntu2.7) ...
Preparing to unpack .../libldap-2.4-2_2.4.42+dfsg-2ubuntu3.3_amd64.deb ...
Unpacking libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.3) over (2.4.42+dfsg-2ubuntu3.2) ...
Preparing to unpack .../libcurl3-gnutls_7.47.0-1ubuntu2.9_amd64.deb ...
Unpacking libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.9) over (7.47.0-1ubuntu2.7) ...
Preparing to unpack .../apt-transport-https_1.2.27_amd64.deb ...
Unpacking apt-transport-https (1.2.27) over (1.2.26) ...
Preparing to unpack .../libxml2_2.9.3+dfsg1-1ubuntu0.6_amd64.deb ...
Preparing to unpack .../linux-firmware_1.157.20_all.deb ...
Unpacking linux-firmware (1.157.20) over (1.157.17) ...
Selecting previously unselected package linux-image-4.4.0-137-generic.
Preparing to unpack .../linux-image-4.4.0-137-generic_4.4.0-137.163_amd64.deb ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Done.
Unpacking linux-image-4.4.0-137-generic (4.4.0-137.163) ...
Selecting previously unselected package linux-image-extra-4.4.0-137-generic.
Preparing to unpack .../linux-image-extra-4.4.0-137-generic_4.4.0-137.163_amd64.deb ...
Unpacking linux-image-extra-4.4.0-137-generic (4.4.0-137.163) ...
Selecting previously unselected package intel-microcode.
Preparing to unpack .../intel-microcode_3.20180807a.0ubuntu0.16.04.1_amd64.deb ...
Unpacking intel-microcode (3.20180807a.0ubuntu0.16.04.1) ...
Selecting previously unselected package amd64-microcode.
Preparing to unpack .../amd64-microcode_3.20180524.1~ubuntu0.16.04.2_amd64.deb ...
Unpacking amd64-microcode (3.20180524.1~ubuntu0.16.04.2) ...
Preparing to unpack .../linux-generic_4.4.0.137.143_amd64.deb ...
Unpacking linux-generic (4.4.0.137.143) over (4.4.0.117.123) ...
Preparing to unpack .../linux-image-generic_4.4.0.137.143_amd64.deb ...
Unpacking linux-image-generic (4.4.0.137.143) over (4.4.0.117.123) ...
Selecting previously unselected package linux-headers-4.4.0-137.
Preparing to unpack .../linux-headers-4.4.0-137_4.4.0-137.163_all.deb ...
Unpacking linux-headers-4.4.0-137 (4.4.0-137.163) ...
Selecting previously unselected package linux-headers-4.4.0-137-generic.
Preparing to unpack .../linux-headers-4.4.0-137-generic_4.4.0-137.163_amd64.deb ...
Unpacking linux-headers-4.4.0-137-generic (4.4.0-137.163) ...
Preparing to unpack .../linux-headers-generic_4.4.0.137.143_amd64.deb ...
Unpacking linux-headers-generic (4.4.0.137.143) over (4.4.0.117.123) ...
Preparing to unpack .../linux-libc-dev_4.4.0-137.163_amd64.deb ...
Unpacking linux-libc-dev:amd64 (4.4.0-137.163) over (4.4.0-120.144) ...
Preparing to unpack .../patch_2.7.5-1ubuntu0.16.04.1_amd64.deb ...
Unpacking patch (2.7.5-1ubuntu0.16.04.1) over (2.7.5-1) ...
Preparing to unpack .../python3-urllib3_1.13.1-2ubuntu0.16.04.2_all.deb ...
Unpacking python3-urllib3 (1.13.1-2ubuntu0.16.04.2) over (1.13.1-2ubuntu0.16.04.1) ...
Preparing to unpack .../python3-requests_2.9.1-3ubuntu0.1_all.deb ...
Unpacking python3-requests (2.9.1-3ubuntu0.1) over (2.9.1-3) ...
Preparing to unpack .../wireless-regdb_2018.05.09-0ubuntu1~16.04.1_all.deb ...
Unpacking wireless-regdb (2018.05.09-0ubuntu1~16.04.1) over (2015.07.20-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up perl-modules-5.22 (5.22.1-9ubuntu0.5) ...
Setting up libperl5.22:amd64 (5.22.1-9ubuntu0.5) ...
Setting up perl (5.22.1-9ubuntu0.5) ...
Setting up libquadmath0:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libgomp1:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libitm1:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libatomic1:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libasan2:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up liblsan0:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libtsan0:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libubsan0:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libcilkrts5:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libmpx0:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up cpp-5 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libcc1-0:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up binutils (2.26.1-1ubuntu1~16.04.7) ...
Setting up libgcc-5-dev:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up gcc-5 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libstdc++-5-dev:amd64 (5.4.0-6ubuntu1~16.04.10) ...
Setting up g++-5 (5.4.0-6ubuntu1~16.04.10) ...
Setting up libapt-inst2.0:amd64 (1.2.27) ...
Setting up apt-utils (1.2.27) ...
Setting up libprocps4:amd64 (2:3.3.10-4ubuntu2.4) ...
Setting up procps (2:3.3.10-4ubuntu2.4) ...
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up libpam-systemd:amd64 (229-4ubuntu21.4) ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up ifupdown (0.8.10ubuntu1.4) ...
Setting up udev (229-4ubuntu21.4) ...
addgroup: The group `input' already exists as a system group. Exiting.
update-initramfs: deferring update (trigger activated)
Setting up initramfs-tools-bin (0.122ubuntu8.13) ...
Setting up initramfs-tools-core (0.122ubuntu8.13) ...
Setting up linux-base (4.5ubuntu1~16.04.1) ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up initramfs-tools (0.122ubuntu8.13) ...
update-initramfs: deferring update (trigger activated)
Setting up libglib2.0-0:amd64 (2.48.2-0ubuntu4.1) ...
No schema files found: doing nothing.
Setting up uuid-runtime (2.27.1-6ubuntu3.6) ...
Setting up libjpeg-turbo8:amd64 (1.4.2-0ubuntu3.1) ...
Setting up libssl1.0.0:amd64 (1.0.2g-1ubuntu4.13) ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up ntp (1:4.2.8p4+dfsg-3ubuntu5.9) ...
Setting up openssh-client (1:7.2p2-4ubuntu2.5) ...
Setting up openssh-sftp-server (1:7.2p2-4ubuntu2.5) ...
Setting up openssh-server (1:7.2p2-4ubuntu2.5) ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Creating SSH2 ED25519 key; this may take some time ...
256 SHA256:YUqqlp+zUxUXGrCLPNEouMutwiMz5f75nEds7q2OtCQ root@ecs-2046 (ED25519)
Setting up ssh (1:7.2p2-4ubuntu2.5) ...
Setting up tzdata (2018e-0ubuntu0.16.04) ...
locale: Cannot set LC_ALL to default locale: No such file or directory

Current default time zone: 'Asia/Shanghai'
Local time is now:      Fri Oct 19 19:11:07 CST 2018.
Universal Time is now:  Fri Oct 19 11:11:07 UTC 2018.
Run 'dpkg-reconfigure tzdata' if you wish to change it.

Setting up distro-info-data (0.28ubuntu0.8) ...
Setting up libmagic1:amd64 (1:5.25-2ubuntu1.1) ...
Setting up file (1:5.25-2ubuntu1.1) ...
Setting up libisc-export160 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libdns-export162 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libpng12-0:amd64 (1.2.54-1ubuntu1.1) ...
Setting up libslang2:amd64 (2.3.0-2ubuntu1.1) ...
Setting up libapparmor-perl (2.10.95-0ubuntu2.10) ...
Setting up apparmor (2.10.95-0ubuntu2.10) ...
Installing new version of config file /etc/apparmor.d/abstractions/private-files ...
Installing new version of config file /etc/apparmor.d/abstractions/private-files-strict ...
Installing new version of config file /etc/apparmor.d/abstractions/ubuntu-browsers.d/user-files ...
locale: Cannot set LC_ALL to default locale: No such file or directory
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Setting up libldap-2.4-2:amd64 (2.4.42+dfsg-2ubuntu3.3) ...
Setting up libcurl3-gnutls:amd64 (7.47.0-1ubuntu2.9) ...
Setting up curl (7.47.0-1ubuntu2.9) ...
Setting up apt-transport-https (1.2.27) ...
Setting up libxml2:amd64 (2.9.3+dfsg1-1ubuntu0.6) ...
Setting up libisc160:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libdns162:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libisccc140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libisccfg140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libbind9-140:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up liblwres141:amd64 (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up bind9-host (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up dnsutils (1:9.10.3.dfsg.P4-8ubuntu1.11) ...
Setting up libdrm-common (2.4.91-2~16.04.1) ...
Setting up libdrm2:amd64 (2.4.91-2~16.04.1) ...
Setting up libelf1:amd64 (0.165-3ubuntu1.1) ...
Setting up libdw1:amd64 (0.165-3ubuntu1.1) ...
Setting up libglib2.0-data (2.48.2-0ubuntu4.1) ...
Setting up libplymouth4:amd64 (0.9.2-3ubuntu13.5) ...
Setting up libpolkit-gobject-1-0:amd64 (0.105-14.1ubuntu0.1) ...
Setting up libx11-data (2:1.6.3-1ubuntu2.1) ...
Setting up libx11-6:amd64 (2:1.6.3-1ubuntu2.1) ...
Setting up openssl (1.0.2g-1ubuntu4.13) ...
Setting up plymouth (0.9.2-3ubuntu13.5) ...
update-initramfs: deferring update (trigger activated)
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
update-rc.d: warning: start and stop actions are no longer supported; falling back to defaults
Setting up plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.5) ...
update-initramfs: deferring update (trigger activated)
Setting up python-apt-common (1.1.0~beta1ubuntu0.16.04.2) ...
Setting up python3-apt (1.1.0~beta1ubuntu0.16.04.2) ...
Setting up shared-mime-info (1.5-2ubuntu0.2) ...
Setting up wget (1.17.1-1ubuntu1.4) ...
Setting up libavahi-common-data:amd64 (0.6.32~rc+dfsg-1ubuntu2.2) ...
Setting up libavahi-common3:amd64 (0.6.32~rc+dfsg-1ubuntu2.2) ...
Setting up libavahi-client3:amd64 (0.6.32~rc+dfsg-1ubuntu2.2) ...
Setting up libcups2:amd64 (2.1.3-4ubuntu0.5) ...
Setting up libcupsfilters1:amd64 (1.8.3-2ubuntu3.4) ...
Setting up libcupsimage2:amd64 (2.1.3-4ubuntu0.5) ...
Setting up cups-common (2.1.3-4ubuntu0.5) ...
Setting up cups-client (2.1.3-4ubuntu0.5) ...
Setting up cups-bsd (2.1.3-4ubuntu0.5) ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Setting up iperf (2.0.5+dfsg1-2ubuntu0.1) ...
Setting up iucode-tool (1.5.1-1ubuntu0.1) ...
Setting up libarchive-zip-perl (1.56-2ubuntu0.1) ...
Setting up libarchive13:amd64 (3.1.2-11ubuntu0.16.04.4) ...
Setting up librados2 (10.2.10-0ubuntu0.16.04.1) ...
Setting up librbd1 (10.2.10-0ubuntu0.16.04.1) ...
Setting up linux-firmware (1.157.20) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-117-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-116-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-87-generic
Setting up linux-image-4.4.0-137-generic (4.4.0-137.163) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-137-generic
Found initrd image: /boot/initrd.img-4.4.0-137-generic
Found linux image: /boot/vmlinuz-4.4.0-117-generic
Found initrd image: /boot/initrd.img-4.4.0-117-generic
Found linux image: /boot/vmlinuz-4.4.0-116-generic
Found initrd image: /boot/initrd.img-4.4.0-116-generic
Found linux image: /boot/vmlinuz-4.4.0-87-generic
Found initrd image: /boot/initrd.img-4.4.0-87-generic
done
Setting up linux-image-extra-4.4.0-137-generic (4.4.0-137.163) ...
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 4.4.0-137-generic /boot/vmlinuz-4.4.0-137-generic
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-zero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-4.4.0-137-generic
Found initrd image: /boot/initrd.img-4.4.0-137-generic
Found linux image: /boot/vmlinuz-4.4.0-117-generic
Found initrd image: /boot/initrd.img-4.4.0-117-generic
Found linux image: /boot/vmlinuz-4.4.0-116-generic
Found initrd image: /boot/initrd.img-4.4.0-116-generic
Found linux image: /boot/vmlinuz-4.4.0-87-generic
Found initrd image: /boot/initrd.img-4.4.0-87-generic
done
Setting up intel-microcode (3.20180807a.0ubuntu0.16.04.1) ...
update-initramfs: deferring update (trigger activated)
intel-microcode: microcode will be updated at next boot
Setting up amd64-microcode (3.20180524.1~ubuntu0.16.04.2) ...
update-initramfs: deferring update (trigger activated)
amd64-microcode: microcode will be updated at next boot
Setting up linux-image-generic (4.4.0.137.143) ...
Setting up linux-headers-4.4.0-137 (4.4.0-137.163) ...
Setting up linux-headers-4.4.0-137-generic (4.4.0-137.163) ...
Setting up linux-headers-generic (4.4.0.137.143) ...
Setting up linux-generic (4.4.0.137.143) ...
Setting up linux-libc-dev:amd64 (4.4.0-137.163) ...
Setting up patch (2.7.5-1ubuntu0.16.04.1) ...
Setting up python3-urllib3 (1.13.1-2ubuntu0.16.04.2) ...
Setting up python3-requests (2.9.1-3ubuntu0.1) ...
Setting up wireless-regdb (2018.05.09-0ubuntu1~16.04.1) ...
Setting up python3-distupgrade (1:16.04.25) ...
Setting up python3-update-manager (1:16.04.14) ...
Setting up ubuntu-release-upgrader-core (1:16.04.25) ...
Setting up update-manager-core (1:16.04.14) ...
Processing triggers for libc-bin (2.23-0ubuntu10) ...
Processing triggers for initramfs-tools (0.122ubuntu8.13) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic
root@ecs-2046:~# sudo do-release-upgrade
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]                                                                                                                                                                                                         
Get:2 Upgrade tool [1260 kB]                                                                                                                                                                                                                 
Fetched 1261 kB in 0s (0 B/s)                                                                                                                                                                                                                
authenticate 'bionic.tar.gz' against 'bionic.tar.gz.gpg' 
extracting 'bionic.tar.gz'

Reading cache

Checking package manager

Continue running under SSH?

This session appears to be running under ssh. It is not recommended 
to perform a upgrade over ssh currently because in case of failure it 
is harder to recover. 

If you continue, an additional ssh daemon will be started at port 
'1022'. 
Do you want to continue?

Continue [yN] y

Starting additional sshd 

To make recovery in case of failure easier, an additional sshd will 
be started on port '1022'. If anything goes wrong with the running 
ssh you can still connect to the additional one. 
If you run a firewall, you may need to temporarily open this port. As 
this is potentially dangerous it's not done automatically. You can 
open the port with e.g.: 
'iptables -I INPUT -p tcp --dport 1022 -j ACCEPT' 

To continue please press [ENTER]

Reading package lists... Done
Building dependency tree        
Reading state information... Done
Hit http://mirrors.cloud.aliyuncs.com/ubuntu xenial InRelease                                                                                                                                                                                
Hit http://mirrors.cloud.aliyuncs.com/ubuntu xenial-updates InRelease                                                                                                                                                                        
Hit http://mirrors.cloud.aliyuncs.com/ubuntu xenial-security InRelease                                                                                                                                                                       
Fetched 0 B in 0s (0 B/s)                                                                                                                                                                                                                    
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Updating repository information

No valid mirror found 

While scanning your repository information no mirror entry for the 
upgrade was found. This can happen if you run an internal mirror or 
if the mirror information is out of date. 

Do you want to rewrite your 'sources.list' file anyway?If you choose 
'Yes' here it will update all 'xenial' to 'bionic' entries. 
If you select 'No' the upgrade will cancel. 

Continue [yN] y
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic InRelease [242 kB]                                                                                                                                                                     
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates InRelease [88.7 kB]                                                                                                                                                            
Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security InRelease [83.2 kB]                                                                                                                                                           
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main Sources [829 kB]                                                                                                                                                                  
Get:5 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe Sources [9051 kB]                                                                                                                                                             
Get:6 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 Packages [1019 kB]                                                                                                                                                          
Get:7 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main i386 Packages [1007 kB]                                                                                                                                                           
Get:8 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main Translation-en [516 kB]                                                                                                                                                           
Get:9 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 Packages [8570 kB]                                                                                                                                                      
Get:10 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe i386 Packages [8531 kB]                                                                                                                                                      
Get:11 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe Translation-en [4941 kB]                                                                                                                                                     
Get:12 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main Sources [200 kB]                                                                                                                                                         
Get:13 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/universe Sources [90.4 kB]                                                                                                                                                    
Get:14 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main amd64 Packages [406 kB]                                                                                                                                                  
Get:15 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main i386 Packages [366 kB]                                                                                                                                                   
Get:16 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/main Translation-en [152 kB]                                                                                                                                                  
Get:17 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/universe amd64 Packages [565 kB]                                                                                                                                              
Get:18 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/universe i386 Packages [560 kB]                                                                                                                                               
Get:19 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-updates/universe Translation-en [148 kB]                                                                                                                                              
Get:20 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main Sources [53.8 kB]                                                                                                                                                       
Get:21 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/universe Sources [20.9 kB]                                                                                                                                                   
Get:22 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main amd64 Packages [184 kB]                                                                                                                                                 
Get:23 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main i386 Packages [147 kB]                                                                                                                                                  
Get:24 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/main Translation-en [71.9 kB]                                                                                                                                                
Get:25 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/universe amd64 Packages [89.0 kB]                                                                                                                                            
Get:26 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/universe i386 Packages [89.0 kB]                                                                                                                                             
Get:27 http://mirrors.cloud.aliyuncs.com/ubuntu bionic-security/universe Translation-en [48.5 kB]                                                                                                                                            
Fetched 38.1 MB in 6s (6317 kB/s)                                                                                                                                                                                                            

Checking package manager
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Calculating the changes

Calculating the changes

Do you want to start the upgrade?


3 installed packages are no longer supported by Canonical. You can 
still get support from the community. 

3 packages are going to be removed. 133 new packages are going to be 
installed. 452 packages are going to be upgraded. 

You have to download a total of 362 M. This download will take about 
57 seconds with your connection. 

Installing the upgrade can take several hours. Once the download has 
finished, the process cannot be canceled. 

 Continue [yN]  Details [d]y

Fetching
Get:1 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/universe amd64 nscd amd64 2.27-3ubuntu1 [78.1 kB]                                                                                                                                      
Get:2 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 locales all 2.27-3ubuntu1 [3612 kB]                                                                                                                                         
Get:3 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main amd64 libc6 amd64 2.27-3ubuntu1 [2824 kB]                                                                                                                                         
Get:4 http://mirrors.cloud.aliyuncs.com/ubuntu bionic/main i386 libc6 i386 2.27-3ubuntu1 [2551 kB]                                                                                                                                        
                                                                       
Fetched 362 MB in 6s (14.7 MB/s)                                                                                                                                                                                                             

Upgrading
Fetched 0 B in 0s (0 B/s)                                                                                                                                                                                                                    
  MarkInstall libc6 [ amd64 ] < 2.23-0ubuntu10 -> 2.27-3ubuntu1 > ( libs ) FU=1
    MarkInstall locales [ amd64 ] < 2.23-0ubuntu10 -> 2.27-3ubuntu1 > ( libs ) FU=0
    Installing libc-bin as Depends of locales
      MarkInstall libc-bin [ amd64 ] < 2.23-0ubuntu10 -> 2.27-3ubuntu1 > ( libs ) FU=0
    MarkInstall nscd [ amd64 ] < 2.23-0ubuntu10 -> 2.27-3ubuntu1 > ( universe/admin ) FU=0
    MarkInstall libc6 [ i386 ] < 2.23-0ubuntu10 -> 2.27-3ubuntu1 > ( libs ) FU=0
Starting pkgProblemResolver with broken count: 0
Starting 2 pkgProblemResolver with broken count: 0
Done

Upgrading
Fetched 0 B in 0s (0 B/s)                                                                                                                                                                                                                
Preconfiguring packages ...
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MONETARY = "zh_CN.UTF-8",
	LC_ADDRESS = "zh_CN.UTF-8",
	LC_TELEPHONE = "zh_CN.UTF-8",
	LC_NAME = "zh_CN.UTF-8",
	LC_MEASUREMENT = "zh_CN.UTF-8",
	LC_IDENTIFICATION = "zh_CN.UTF-8",
	LC_NUMERIC = "zh_CN.UTF-8",
	LC_PAPER = "zh_CN.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Preconfiguring packages ...
(Reading database ... 165450 files and directories currently installed.)
Preparing to unpack .../libc-dev-bin_2.27-3ubuntu1_amd64.deb ...
Unpacking libc-dev-bin (2.27-3ubuntu1) over (2.23-0ubuntu10) ...

Progress: [  5%]
Preparing to unpack .../libc6-dev_2.27-3ubuntu1_amd64.deb ...

Progress: [ 11%]
Unpacking libc6-dev:amd64 (2.27-3ubuntu1) over (2.23-0ubuntu10) ...

Progress: [ 16%]
Preparing to unpack .../locales_2.27-3ubuntu1_all.deb ...
Unpacking locales (2.27-3ubuntu1) over (2.23-0ubuntu10) ...

Progress: [ 22%]
Preparing to unpack .../nscd_2.27-3ubuntu1_amd64.deb ...

Progress: [ 27%]
Unpacking nscd (2.27-3ubuntu1) over (2.23-0ubuntu10) ...

Progress: [ 33%]
Preparing to unpack .../libc6_2.27-3ubuntu1_amd64.deb ...
De-configuring libc6:i386 (2.23-0ubuntu10) ...
Checking for services that may need to be restarted...
Checking init scripts...
Nothing to restart.
Unpacking libc6:amd64 (2.27-3ubuntu1) over (2.23-0ubuntu10) ...

Progress: [ 38%]
Preparing to unpack .../libc6_2.27-3ubuntu1_i386.deb ...

Progress: [ 44%]
Checking for services that may need to be restarted...
Checking init scripts...
Nothing to restart.
Unpacking libc6:i386 (2.27-3ubuntu1) over (2.23-0ubuntu10) ...

Progress: [ 50%]
Preparing to unpack .../libc-bin_2.27-3ubuntu1_amd64.deb ...
Unpacking libc-bin (2.27-3ubuntu1) over (2.23-0ubuntu10) ...

Progress: [ 55%]
Setting up libc6:amd64 (2.27-3ubuntu1) ...
Installing new version of config file /etc/ld.so.conf.d/x86_64-linux-gnu.conf ...

Progress: [ 61%]
Checking for services that may need to be restarted...
Checking init scripts...
Nothing to restart.
Setting up libc6:i386 (2.27-3ubuntu1) ...
Installing new version of config file /etc/ld.so.conf.d/i386-linux-gnu.conf ...

Progress: [ 66%]
Checking for services that may need to be restarted...
Checking init scripts...
Nothing to restart.
Setting up libc-bin (2.27-3ubuntu1) ...

Progress: [ 72%]
Setting up libc-dev-bin (2.27-3ubuntu1) ...

Progress: [ 77%]
Setting up libc6-dev:amd64 (2.27-3ubuntu1) ...

Progress: [ 83%]
Setting up locales (2.27-3ubuntu1) ...
Installing new version of config file /etc/locale.alias ...

Progress: [ 88%]
locale: Cannot set LC_ALL to default locale: No such file or directory
Generating locales (this might take a while)...
  en_AG.UTF-8... done
  en_AU.UTF-8... done
  en_BW.UTF-8... done
  en_CA.UTF-8... done
  en_DK.UTF-8... done
  en_GB.UTF-8... done
  en_HK.UTF-8... done
  en_IE.UTF-8... done
  en_IN.UTF-8... done
  en_NG.UTF-8... done
  en_NZ.UTF-8... done
  en_PH.UTF-8... done
  en_SG.UTF-8... done
  en_US.UTF-8... done
  en_ZA.UTF-8... done
  en_ZM.UTF-8... done
  en_ZW.UTF-8... done
Generation complete.
Setting up nscd (2.27-3ubuntu1) ...
Installing new version of config file /etc/init.d/nscd ...

Progress: [ 94%]
insserv: warning: current start runlevel(s) (empty) of script `nscd' overrides LSB defaults (2 3 4 5).
insserv: warning: current stop runlevel(s) (0 1 2 3 4 5 6) of script `nscd' overrides LSB defaults (0 1 6).
Processing triggers for ureadahead (0.100.0-19) ...
Processing triggers for systemd (229-4ubuntu21.4) ...
Processing triggers for man-db (2.7.5-1) ...
Reading package lists... Done    
Building dependency tree          
Reading state information... Done

Calculating the changes

Calculating the changes

Upgrading
Fetched 0 B in 0s (0 B/s)                                                                                                                                                                                                                    
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
	LANGUAGE = (unset),
	LC_ALL = (unset),
	LC_MONETARY = "zh_CN.UTF-8",
	LC_ADDRESS = "zh_CN.UTF-8",
	LC_TELEPHONE = "zh_CN.UTF-8",
	LC_NAME = "zh_CN.UTF-8",
	LC_MEASUREMENT = "zh_CN.UTF-8",
	LC_IDENTIFICATION = "zh_CN.UTF-8",
	LC_NUMERIC = "zh_CN.UTF-8",
	LC_PAPER = "zh_CN.UTF-8",
	LANG = "en_US.UTF-8"
    are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US.UTF-8").
locale: Cannot set LC_ALL to default locale: No such file or directory
Extracting templates from packages: 100%
Preconfiguring packages ...
locale: Cannot set LC_ALL to default locale: No such file or directory
Extracting templates from packages: 100%
Preconfiguring packages ...
locale: Cannot set LC_ALL to default locale: No such file or directory
(Reading database ... 165528 files and directories currently installed.)
Preparing to unpack .../base-files_10.1ubuntu2.3_amd64.deb ...
Unpacking base-files (10.1ubuntu2.3) over (9.4ubuntu4.7) ...
Processing triggers for plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.5) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Processing triggers for man-db (2.7.5-1) ...
Processing triggers for initramfs-tools (0.122ubuntu8.13) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic
Setting up base-files (10.1ubuntu2.3) ...
Installing new version of config file /etc/debian_version ...
Installing new version of config file /etc/issue ...
Installing new version of config file /etc/issue.net ...
Installing new version of config file /etc/lsb-release ...
Updating /etc/profile to current default.
motd-news.service is a disabled or a static unit, not starting it.
Processing triggers for plymouth-theme-ubuntu-text (0.9.2-3ubuntu13.5) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for initramfs-tools (0.122ubuntu8.13) ...
update-initramfs: Generating /boot/initrd.img-4.4.0-137-generic
(Reading database ... 165535 files and directories currently installed.)
Preparing to unpack .../debianutils_4.8.4_amd64.deb ...
Unpacking debianutils (4.8.4) over (4.7) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up debianutils (4.8.4) ...
(Reading database ... 165535 files and directories currently installed.)
Preparing to unpack .../bash_4.4.18-2ubuntu1_amd64.deb ...
Unpacking bash (4.4.18-2ubuntu1) over (4.3-14ubuntu1.2) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up bash (4.4.18-2ubuntu1) ...
Installing new version of config file /etc/bash.bashrc ...
Installing new version of config file /etc/skel/.profile ...
update-alternatives: using /usr/share/man/man7/bash-builtins.7.gz to provide /usr/share/man/man7/builtins.7.gz (builtins.7.gz) in auto mode
(Reading database ... 165535 files and directories currently installed.)
Preparing to unpack .../libbsd0_0.8.7-1_amd64.deb ...
Unpacking libbsd0:amd64 (0.8.7-1) over (0.8.2-1) ...
Preparing to unpack .../libtinfo5_6.1-1ubuntu1.18.04_amd64.deb ...
Unpacking libtinfo5:amd64 (6.1-1ubuntu1.18.04) over (6.0+20160213-1ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libtinfo5:amd64 (6.1-1ubuntu1.18.04) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
(Reading database ... 165536 files and directories currently installed.)
Preparing to unpack .../libncurses5_6.1-1ubuntu1.18.04_amd64.deb ...
Unpacking libncurses5:amd64 (6.1-1ubuntu1.18.04) over (6.0+20160213-1ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libncurses5:amd64 (6.1-1ubuntu1.18.04) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
(Reading database ... 165536 files and directories currently installed.)
Preparing to unpack .../libncursesw5_6.1-1ubuntu1.18.04_amd64.deb ...
Unpacking libncursesw5:amd64 (6.1-1ubuntu1.18.04) over (6.0+20160213-1ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libncursesw5:amd64 (6.1-1ubuntu1.18.04) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
(Reading database ... 165536 files and directories currently installed.)
Preparing to unpack .../ncurses-bin_6.1-1ubuntu1.18.04_amd64.deb ...
Unpacking ncurses-bin (6.1-1ubuntu1.18.04) over (6.0+20160213-1ubuntu1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up ncurses-bin (6.1-1ubuntu1.18.04) ...
(Reading database ... 165537 files and directories currently installed.)
Preparing to unpack .../bsdmainutils_11.1.2ubuntu1_amd64.deb ...
Unpacking bsdmainutils (11.1.2ubuntu1) over (9.0.6ubuntu3) ...
Preparing to unpack .../bsdutils_1%3a2.31.1-0.4ubuntu3.2_amd64.deb ...
Unpacking bsdutils (1:2.31.1-0.4ubuntu3.2) over (1:2.27.1-6ubuntu3.6) ...
Setting up bsdutils (1:2.31.1-0.4ubuntu3.2) ...
(Reading database ... 165541 files and directories currently installed.)
Preparing to unpack .../coreutils_8.28-1ubuntu1_amd64.deb ...
Unpacking coreutils (8.28-1ubuntu1) over (8.25-2ubuntu3~16.04) ...
Processing triggers for install-info (6.1.0.dfsg.1-5) ...
Setting up coreutils (8.28-1ubuntu1) ...
(Reading database ... 165543 files and directories currently installed.)
Preparing to unpack .../liblzma5_5.2.2-1.3_amd64.deb ...
Unpacking liblzma5:amd64 (5.2.2-1.3) over (5.1.1alpha+20120614-2ubuntu2) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up liblzma5:amd64 (5.2.2-1.3) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Selecting previously unselected package libzstd1:amd64.
(Reading database ... 165543 files and directories currently installed.)
Preparing to unpack .../libzstd1_1.3.3+dfsg-2ubuntu1_amd64.deb ...
Unpacking libzstd1:amd64 (1.3.3+dfsg-2ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
Setting up libzstd1:amd64 (1.3.3+dfsg-2ubuntu1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
(Reading database ... 165548 files and directories currently installed.)
Preparing to unpack .../debconf-i18n_1.5.66_all.deb ...
Unpacking debconf-i18n (1.5.66) over (1.5.58ubuntu1) ...
Preparing to unpack .../debconf_1.5.66_all.deb ...
Unpacking debconf (1.5.66) over (1.5.58ubuntu1) ...
Setting up debconf (1.5.66) ...
locale: Cannot set LC_ALL to default locale: No such file or directory
dpkg: libperl5.22:amd64: dependency problems, but removing anyway as you requested:
 perl depends on libperl5.22 (= 5.22.1-9ubuntu0.5).

(Reading database ... 165546 files and directories currently installed.)
Removing libperl5.22:amd64 (5.22.1-9ubuntu0.5) ...
dpkg: perl-modules-5.22: dependency problems, but removing anyway as you requested:
 perl depends on perl-modules-5.22 (>= 5.22.1-9ubuntu0.5).

Removing perl-modules-5.22 (5.22.1-9ubuntu0.5) ...
dpkg: man-db: dependency problems, but processing triggers anyway as you requested:
 man-db depends on bsdmainutils; however:
  Package bsdmainutils is not configured yet.

Processing triggers for man-db (2.7.5-1) ...
Processing triggers for libc-bin (2.27-3ubuntu1) ...
(Reading database ... 163848 files and directories currently installed.)
Preparing to unpack .../libmagic1_1%3a5.32-2ubuntu0.1_amd64.deb ...
Unpacking libmagic1:amd64 (1:5.32-2ubuntu0.1) over (1:5.25-2ubuntu1.1) ...
Selecting previously unselected package libmagic-mgc.
Prepar

Installing PIP under mac

Project github address: bitcarmanlee easy-algorithm-interview-and practice
welcome to star, message, study and progress together
PIP is a common Python package management tool, similar to Java’s Maven. If you use Python, you can’t do without PIP.
when trying to install PIP using home-brew on the new MAC, there were some minor problems:

bogon:~ wanglei$ brew install pip
Error: No available formula with the name "pip"
Homebrew provides pip via: `brew install python`. However you will then
have two Pythons installed on your Mac, so alternatively you can install
pip via the instructions at:

  https://pip.readthedocs.org/en/stable/installing/#install-pip

As you can see, PIP is installed with Python in home-BREW.
Another way:

bogon:~ wanglei$ sudo easy_install pip
Password:
Searching for pip
Reading https://pypi.python.org/simple/pip/
...

Just a moment, PIP is installed…

How to fix process system isn’t responding on Android?

How to fix process system isn’t responding on Android?



While opening apps on your android device, if you get this error which says ‘process system isn’t responding’, then you don’t need to worry about that can be fixed in a number of easy ways that if not every then surely some of them going to work. It is just a normal error which happens when kernels of apps are not working properly or hardware doesn’t seem to respond when ordered by operating system to open. Here I am going to state three of the best possible solutions which are surely going to work for you.

Fix process system isn’t responding No 1:

    1. If you have rooted your phone then undo it. Go to factory settings and reset them. Then clear the phone cache. Flash the stock room using your device.
    Note: If step 3 doesn’t work then follow the step 4. Download this on your device and flash your phone using Odin 3.04.

Process system Not responding- Fix No 2:

This is a very simply one and could be done in a matter of pressing some buttons.

    Boot your device by pressing and holding the buttons in the following order.
    Power > Menu > Volume up buttons. Wipe the phone cache using stock recovery mode and then re-boot your phone.

This is going to restore your settings and fix the error.
Process System Isn’t responding in Android- Fix no 3:
Here comes the simplest one. You won’t believe this actually works.
All you’ve got to do is remove the battery from your phone and hold the power button for a couple of seconds (or maybe more time if you want to but still it should be enough). Put the battery again and power on your phone. In this way you can fix this error the easiest way.
Fix “process system is not responding” No 4:
There still is something that you can do to get the error fixed. This is more of a hardware error that happens due to the SD card sometimes. For instance you have bought a new phone and it is giving this then it means that something in the hardware is messing with your phone because there are not any chances that a new phone would give this error. And since I have mentioned that this could happen due to something wrong in your SD card, then it is obvious that changing the SD card could help fix the problem. Another thing that I know off is that this problem seem to occur on UHC type 64 GB SD cards and if you buy a new 128 GB UHC type SD then you are most likely to get over with this problem.
Some useful information on “process system isn’t responding” error:
Here is some important information of the problem. As I have mentioned that problem can be also be fixed by changing the SD card. But you can also fix the problem without changing the SD. And that is not a very difficult task either. All you have got to do is moving some apps that are on SD, back to the phone memory and this might solve the problem. The reasons behind is that some apps are not meant to function properly on SD and when you move them to it, they cause this error “process system isn’t responding”. So our fix is simple. Move back some apps back to your phone memory and you might fix this problem with this simple way too. Hope you liked this new update in the post.
Finding this solution to the fix was quite a pleasant thing and in case you know any other solutions to this problem then you can feel free to share it with us. Leave your feedback and queries in the comment section below and stay tuned to AGEEKY for more!

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
https://github.com/M66B/XPrivacy/issues/1569

I have the same issue but, while it happens every boot, it only affects one of my devices (Nexus7 grouper). I am assuming that the cause is simply a lack of resources (esp memory) during the boot process and that very little can be done from XPrivacy, even though I believe that it’s running within the System process. The ANR is happening on the System process itself and, while XPrivacy might be contributing to the problem, there’s simply a lot to do during the boot process and XPrivacy needs to be initialized in order to be able to effectively restrict all the processes and apps that get started at that time.
Recently, I have been working with the App Settings, Boot Manager and ReceiverStop modules for XPosed to reduce the system load during boot but I have not yet found a solution that prevents your issue from occurring. Again though, it only happens on one (admittedly older) device.

Mac — Open keyboard F1 – F12 function key

1. Enter system preferences
2. Keyboard
3. Select the option “use F1, F2, etc. as standard function keys…” After setting
, the original function key can be implemented by holding fn+F1 ~ F12
Some functions in F1 ~ F12 are often used in the development of IDEA, so it is convenient to set up the development



How to center your HTML button itself? ——Use the align attribute of center or Div

How do you center your HTML button itself? 
There are two ways to do it.
 
Method one:
In its parent label, set the center property to look like this:

       
The procedure is as follows:

<html>
<body>

<center><button onClick="myClick()">hit me</button></center>

<script>
function myClick()
{
	alert("123");
}
</script>
</body>
</html>

 
 
Method 2:
Div, the effect is as follows:

 
The procedure is as follows:

<html>
<body>

<div align="center"><button onClick="myClick()">hit me</button></div>

<script>
function myClick()
{
	alert("123");
}
</script>
</body>
</html>

 
It’s simple, but it’s dry.
 
 

 
 

21. Merge Two Sorted Lists [easy] (Python)

Topic link
https://leetcode.com/problems/merge-two-sorted-lists/
The questions in the original

Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.

The title translation
Merge the two ordered lists and return the new list. The new list should be the result of splicing two old lists.
Thinking method
Thinking a
After merging, the linked list is still in order. Two linked lists can be traversed at the same time. Each time, the nodes with smaller values in the two lists are selected and connected in turn to obtain the final linked list.
code

# Definition for singly-linked list.
# class ListNode(object):
#     def __init__(self, x):
#         self.val = x
#         self.next = None

class Solution(object):
    def mergeTwoLists(self, l1, l2):
        """
        :type l1: ListNode
        :type l2: ListNode
        :rtype: ListNode
        """
        if not l1 or not l2:
            return l1 or l2
        head = cur = ListNode(0)
        while l1 and l2:
            if l1.val < l2.val:
                cur.next = l1
                l1 = l1.next
            else:
                cur.next = l2
                l2 = l2.next
            cur = cur.next
        cur.next = l1 or l2
        return head.next

Idea 2
Similar idea one, you can take the linked list with a smaller head node as a reference, and insert the nodes in another linked list into the linked list according to the size, forming a large ordered linked list
code

# Definition for singly-linked list.
# class ListNode(object):
#     def __init__(self, x):
#         self.val = x
#         self.next = None

class Solution(object):
    def mergeTwoLists(self, l1, l2):
        """
        :type l1: ListNode
        :type l2: ListNode
        :rtype: ListNode
        """
        if not l1 or not l2:
            return l1 or l2
        head = small = l1 if l1.val < l2.val else l2
        big = l1 if l1.val >= l2.val else l2
        pre = None
        while big:
            if not small:
                pre.next = big
                break
            if big.val >= small.val:
                pre = small
                small = small.next
            else:
                tmp = big.next
                pre.next = big
                pre = big
                big.next = small
                big = tmp
        return head

Thought three
Let’s think recursively.
code

# Definition for singly-linked list.
# class ListNode(object):
#     def __init__(self, x):
#         self.val = x
#         self.next = None

class Solution(object):
    def mergeTwoLists(self, l1, l2):
        """
        :type l1: ListNode
        :type l2: ListNode
        :rtype: ListNode
        """
        if not l1 or not l2:
            return l1 or l2
        if l1.val < l2.val:
            l1.next = self.mergeTwoLists(l1.next, l2)
            return l1
        else:
            l2.next = self.mergeTwoLists(l1, l2.next)
            return l2

PS: The novice brush LeetCode, the new handwriting blog, write wrong or write unclear please help point out, thank you!
reprint please indicate the: http://blog.csdn.net/coder_orz/article/details/51529359

Installing nmap on Mac OS

brew install nmap

michael01s-Mac:~ michael01$ nmap 192.168.3.3
Starting Nmap 7.70 ( https://nmap.org ) at 2018-04-08 20:14 PDT
Nmap scan report for 192.168.3.3
Host is up (0.0084s latency).
Not shown: 993 filtered ports
PORT     STATE SERVICE
135/tcp  open  msrpc
139/tcp  open  netbios-ssn
443/tcp  open  https
445/tcp  open  microsoft-ds
912/tcp  open  apex-mesh
5357/tcp open  wsdapi
8080/tcp open  http-proxy


Nmap done: 1 IP address (1 host up) scanned in 15.94 seconds
michael01s-Mac:~ michael01$ 

Check whether the specified port is enabled:

michael01s-Mac:~ michael01$ nmap -n --open -p 1008 192.168.3.3/24
Starting Nmap 7.70 ( https://nmap.org ) at 2018-04-08 20:19 PDT
Nmap scan report for 192.168.3.3
Host is up (0.0040s latency).


PORT     STATE SERVICE
1008/tcp open  ufsd


Nmap done: 256 IP addresses (3 hosts up) scanned in 3.99 seconds

Stata external commands: the most common and up-to-date commands


Author: lian yu jun (lingnan college, sun yat-sen university)

original text: lian yu jun zhihu column

. Stata highlights ||


The article directories
Listing 3 Most commonly used external commands 4 Newly published external commands 5 Additional instructions

1 the feed

Today, stata is in its 15th release and is getting better and better. Still, diligent Stata users continue to develop new programs every day, narrowing the gap between theoretical metrics and practical applications. Let’s take a look at stata’s resources for external commands, including: Where do you get external commands?What external commands are the most commonly used and popular?What are the latest releases?Paying attention to these external commands can greatly improve the efficiency of our analysis.

The best way to get external commands is to use the -findit – command, and when the search is complete, follow the prompts of Stata to download and install the corresponding command and the sample data or dofiles provided by the author (if any). As you can see, Stata | is Adding user-written commands.


List of external commands
Stata has a complete list of external commands on its website.


3 The most common external commands
Enter SSC hot, n(10) to display the top 10 commands that have attracted the most attention in the past three months:

May 2017                  
Rank  # hits    Package     Author(s)
----------------------------------------------------
        Aug 2018   
  Rank   # hits    Package       Author(s)
  ----------------------------------------------------------------------
     1  331271.0    findname      Nicholas J. Cox                         
     2  19504.6    outreg2       Roy Wada                                
     3  18223.6    estout        Ben Jann                                
     4  11066.7    distinct      Gary Longton, Nicholas J. Cox           
     5   7746.3    winsor        Nicholas J. Cox                         
     6   6881.7    winsor2       Lian Yu-jun                             
     7   6598.7    ivreg2        Mark E Schaffer, et al.                      
     8   6579.3    ivreg210      Mark E Schaffer, et al.                        
     9   6571.1    ivreg28       Mark E Schaffer, et al.                         
    10   6561.8    ivreg29       Christopher F Baum, et al.                        
----------------------------------------------------
(Click on package name for description)

It can be seen that the –outreg2– and –estout-commands used to output regression results and statistics tables are ranked second and second respectively; When dealing with outliers, the most commonly used indentation –winsor– and –winsor2– commands rank 5th and 6th respectively.
These commands can be installed directly to your computer using the – SSC install– command. Of course, you can also directly click the command name (stata window appears in blue with connection), and click click here to install in the following popup interface.

--------------------------------------------------
package winsor2 
from http://fmwww.bc.edu/RePEc/bocode/w
--------------------------------------------------
TITLE
      'WINSOR2': module to winsorize data

DESCRIPTION/AUTHOR(S)

   winsor2 can winsorize a varlist, 
   operate with the by prefix,
   and offers a replace option.

   KW: winsor
   KW: winsorize
   KW: data management

   Requires: Stata version 8

   Distribution-Date: 20141222

   Author: Lian Yu-jun, Department of Finance, 
          Sun Yat-Sen University, China
   Support: email [email protected]


INSTALLATION FILES     (click here to install)
      winsor2.ado
      winsor2.sthlp
--------------------------------------------------
(click here to return to the previous screen)

4 Newly issued external commands
To see what new external commands have been issued in the last month, simply type SSC new. The search page displays dozens of new commands. Here are some of the more interesting ones to explain.
The ddid command is used to implement a more general DID model. Its main feature is to allow multi-period policy shocks, and policy shocks can occur at different time points. CORR2DOCX is published by li chuntao, a teacher of zhongnan economics and law, which is used to output Spearman and Pearson correlation coefficient into word documents. TWITTER2STATA can download the data from Twitter directly to stata. XTGCAUSE command USES Dumitrescu & A method proposed by Hurlin (Economic Modelling, 2012) was used to test whether Granger causality existed in heterogeneous panels.

SSC Stata modules created or 
revised 2017-07-09 to 2017-08-09
--------------------------------
THSEARCH
 module to evaluate threshold search model for non-linear models 
 based on information criterion
 Authors: Ho Fai Chan  Brenda Gannon  David Harris  Mark Harris       
 Req: Stata version 7
 Created: 2017-08-05

DDID
 module to compute pre- and post-treatment estimation of the  
 Average Treatment Effect (ATE) with binary time-varying treatment
 Authors: Giovanni Cerulli       
 Req: Stata version 14
 Created: 2017-07-31

CORR2DOCX
 module to report Pearson & Spearman correlation coefficients 
 to formatted table in DOCX file
 Authors: Chuntao Li   Zijian Li  Yuan Xue       
 Req: Stata version 15
 Revised: 2017-08-04

SICFF
 module to create Fama French Industry Variable from SIC Code
 Authors:   Tyson Van Alfen       
 Req: Stata version 10
 Created: 2017-07-24

TWITTER2STATA
 module to import data from Twitter
 Authors: Kevin Crow       
 Req: Stata version 15
 Revised: 2017-07-31

SMCLPRES
 module to create a SMCL presentation from a do file
 Authors: Maarten L. Buis       
 Req: Stata version 8
 Revised: 2017-07-16

XTGCAUSE
 module to test for Granger non-causality in heterogeneous panels
 Authors: Luciano Lopez  Sylvain Weber       
 Req: Stata version 13.1
 Revised: 2017-07-31

To view all external commands issued by SSC, you can browse the Boston College Department of Economics or view them in the Stata command window. The command is: net from Index of /RePEc/bocode


5 Other Instructions
To view all external commands that have been installed, just type – ado-command; To update these external commands, use –adoupdate-; To uninstall these external commands, you can use –ado uninstall-; In addition to SSC, the UCLA website also provides a number of Stata external commands (all of which can be searched in the Stata command window using the findit command). The Stata column at UCLA provides a number of resources for learning about Stata.


Author: Lian Yujun (Associate Professor of Finance department, Lingnan College, Sun Yat-sen University)
Online course: | online Stata course for lian yu jun, | special subject course for youku Stata open course


check a tree is balanced or not

Question:
Given a binary tree, check whether it is balanced or not.
Analyze:

Consider a height-balancing scheme where following conditions should be checked to determine if a binary tree is balanced.
An empty tree is height-balanced. A non-empty binary tree T is balanced if:
1) Left subtree of T is balanced
2) Right subtree of T is balanced
3) The difference between heights of left subtree and right subtree is not more than 1.
The above height-balancing scheme is used in AVL trees. The diagram below shows two trees, one of them is height-balanced and other is not. The second tree is not height-balanced because height of left subtree is 2 more than height of right subtree.

To check if a tree is height-balanced, get the height of left and right subtrees. Return true if difference between heights is not more than 1 and left and right subtrees are balanced, otherwise return false.
Code:

/**
 * Definition for binary tree
 * public class TreeNode {
 *     int val;
 *     TreeNode left;
 *     TreeNode right;
 *     TreeNode(int x) { val = x; }
 * }
 */
public class Solution {
    public boolean isBalanced(TreeNode root) {
        if (root == null) return true;
        if (Math.abs(height(root.left) - height(root.right)) > 1) return false;
        return isBalanced(root.left) && isBalanced(root.right);
    }
    
    public int height(TreeNode root) {
        if (root == null) return 0;
        return Math.max(height(root.left), height(root.right)) + 1;
    }
}

The complexity of the code above is O(N^2). However, some interviewers may ask to provide solution with O(N) complexity. Below is the solution with O(N) complexity. The main idea is if the subtree is balanced, return the true height, else, return -1. Therefore, the parent node of that unbalanced subtree also has -1 height.

public class Solution {
    public boolean isBalanced(TreeNode root) {
        return getDepth(root) >= 0;
    }
    
    public int getDepth(TreeNode node) {
        if (node == null) return 0;
        int leftDepth = getDepth(node.left);
        if (leftDepth < 0) return -1;
        
        int rightDepth = getDepth(node.right);
        if (rightDepth < 0) return -1;
        
        if (Math.abs(leftDepth - rightDepth) > 1) return -1;
        return Math.max(leftDepth, rightDepth) + 1;
    }
}

Reference: 

http://www.geeksforgeeks.org/how-to-determine-if-a-binary-tree-is-balanced/
http://blog.theliuy.com/2012/balanced-binary-tree/