upir@upir-Rev-1-0:~$ sudo sh -c 'echo "deb [arch=amd64] https://apt-mo.trafficmanager.net/repos/dotnet/ xenial main" > /etc/apt/sources.list.d/dotnetdev.list'
[sudo] upir 的密码:
upir@upir-Rev-1-0:~$ sudo apt-key adv --keyserver apt-mo.trafficmanager.net --recv-keys 417A0893
Executing: /tmp/tmp.aAAxfRnmIc/gpg.1.sh --keyserver
apt-mo.trafficmanager.net
--recv-keys
417A0893
gpg: 下载密钥‘417A0893’,从 hkp 服务器 apt-mo.trafficmanager.net
gpg: 密钥 417A0893:公钥“MS Open Tech <interop@microsoft.com>”已导入
gpg: 合计被处理的数量:1
gpg: 已导入:1 (RSA: 1)
upir@upir-Rev-1-0:~$ sudo apt-get update
命中:1 http://cn.archive.ubuntu.com/ubuntu xenial InRelease
命中:2 http://cn.archive.ubuntu.com/ubuntu xenial-updates InRelease
忽略:3 http://dl.google.com/linux/chrome/deb stable InRelease
命中:4 http://cn.archive.ubuntu.com/ubuntu xenial-backports InRelease
命中:5 http://dl.google.com/linux/chrome/deb stable Release
获取:7 https://apt-mo.trafficmanager.net/repos/dotnet xenial InRelease [2,820 B]
命中:8 http://ppa.launchpad.net/webupd8team/java/ubuntu xenial InRelease
获取:9 http://security.ubuntu.com/ubuntu xenial-security InRelease [94.5 kB]
获取:10 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 Packages [5,159 B]
已下载 102 kB,耗时 1秒 (55.2 kB/s)
正在读取软件包列表... 完成
upir@upir-Rev-1-0:~$ sudo apt-get install dotnet-dev-1.0.0-preview2-003121
正在读取软件包列表... 完成
正在分析软件包的依赖关系树
正在读取状态信息... 完成
将会同时安装下列软件:
dotnet-host dotnet-hostfxr-1.0.1
dotnet-sharedframework-microsoft.netcore.app-1.0.0 liblldb-3.6 libllvm3.6v5
liblttng-ust-ctl2 liblttng-ust0 liburcu4
下列【新】软件包将被安装:
dotnet-dev-1.0.0-preview2-003121 dotnet-host dotnet-hostfxr-1.0.1
dotnet-sharedframework-microsoft.netcore.app-1.0.0 liblldb-3.6 libllvm3.6v5
liblttng-ust-ctl2 liblttng-ust0 liburcu4
升级了 0 个软件包,新安装了 9 个软件包,要卸载 0 个软件包,有 19 个软件包未被升级。
需要下载 55.3 MB 的归档。
解压缩后会消耗 170 MB 的额外空间。
您希望继续执行吗? [Y/n] y
获取:1 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 libllvm3.6v5 amd64 1:3.6.2-3ubuntu2 [8,075 kB]
获取:2 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 dotnet-host amd64 1.0.2-beta-000555-00-1 [33.6 kB]
获取:3 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 dotnet-hostfxr-1.0.1 amd64 1.0.1-1 [123 kB]
获取:4 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 dotnet-sharedframework-microsoft.netcore.app-1.0.0 amd64 1.0.0-1 [22.6 MB]
获取:5 http://cn.archive.ubuntu.com/ubuntu xenial/main amd64 liblldb-3.6 amd64 1:3.6.2-3ubuntu2 [7,303 kB]
获取:6 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 liburcu4 amd64 0.9.1-3 [47.3 kB]
获取:7 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 liblttng-ust-ctl2 amd64 2.7.1-1 [72.2 kB]
获取:8 http://cn.archive.ubuntu.com/ubuntu xenial/universe amd64 liblttng-ust0 amd64 2.7.1-1 [127 kB]
获取:9 https://apt-mo.trafficmanager.net/repos/dotnet xenial/main amd64 dotnet-dev-1.0.0-preview2-003121 amd64 1.0.0-preview2-003121-1 [16.9 MB]
已下载 55.3 MB,耗时 3分 59秒 (231 kB/s)
正在选中未选择的软件包 libllvm3.6v5:amd64。
(正在读取数据库 ... 系统当前共安装有 229256 个文件和目录。)
正准备解包 .../libllvm3.6v5_1%3a3.6.2-3ubuntu2_amd64.deb ...
正在解包 libllvm3.6v5:amd64 (1:3.6.2-3ubuntu2) ...
正在选中未选择的软件包 liblldb-3.6。
正准备解包 .../liblldb-3.6_1%3a3.6.2-3ubuntu2_amd64.deb ...
正在解包 liblldb-3.6 (1:3.6.2-3ubuntu2) ...
正在选中未选择的软件包 liburcu4:amd64。
正准备解包 .../liburcu4_0.9.1-3_amd64.deb ...
正在解包 liburcu4:amd64 (0.9.1-3) ...
正在选中未选择的软件包 liblttng-ust-ctl2:amd64。
正准备解包 .../liblttng-ust-ctl2_2.7.1-1_amd64.deb ...
正在解包 liblttng-ust-ctl2:amd64 (2.7.1-1) ...
正在选中未选择的软件包 liblttng-ust0:amd64。
正准备解包 .../liblttng-ust0_2.7.1-1_amd64.deb ...
正在解包 liblttng-ust0:amd64 (2.7.1-1) ...
正在选中未选择的软件包 dotnet-host。
正准备解包 .../dotnet-host_1.0.2-beta-000555-00-1_amd64.deb ...
正在解包 dotnet-host (1.0.2-beta-000555-00-1) ...
正在选中未选择的软件包 dotnet-hostfxr-1.0.1。
正准备解包 .../dotnet-hostfxr-1.0.1_1.0.1-1_amd64.deb ...
正在解包 dotnet-hostfxr-1.0.1 (1.0.1-1) ...
正在选中未选择的软件包 dotnet-sharedframework-microsoft.netcore.app-1.0.0。
正准备解包 .../dotnet-sharedframework-microsoft.netcore.app-1.0.0_1.0.0-1_amd64.deb ...
正在解包 dotnet-sharedframework-microsoft.netcore.app-1.0.0 (1.0.0-1) ...
正在选中未选择的软件包 dotnet-dev-1.0.0-preview2-003121。
正准备解包 .../dotnet-dev-1.0.0-preview2-003121_1.0.0-preview2-003121-1_amd64.deb ...
正在解包 dotnet-dev-1.0.0-preview2-003121 (1.0.0-preview2-003121-1) ...
正在处理用于 libc-bin (2.23-0ubuntu3) 的触发器 ...
正在处理用于 man-db (2.7.5-1) 的触发器 ...
正在设置 libllvm3.6v5:amd64 (1:3.6.2-3ubuntu2) ...
正在设置 liblldb-3.6 (1:3.6.2-3ubuntu2) ...
正在设置 liburcu4:amd64 (0.9.1-3) ...
正在设置 liblttng-ust-ctl2:amd64 (2.7.1-1) ...
正在设置 liblttng-ust0:amd64 (2.7.1-1) ...
正在设置 dotnet-host (1.0.2-beta-000555-00-1) ...
正在设置 dotnet-hostfxr-1.0.1 (1.0.1-1) ...
正在设置 dotnet-sharedframework-microsoft.netcore.app-1.0.0 (1.0.0-1) ...
正在设置 dotnet-dev-1.0.0-preview2-003121 (1.0.0-preview2-003121-1) ...
This software may collect information about you and your use of the software, and send that to Microsoft.
Please visit http://aka.ms/dotnet-cli-eula for more information.
正在处理用于 libc-bin (2.23-0ubuntu3) 的触发器 ...
upir@upir-Rev-1-0:~$ mkdir hwapp
upir@upir-Rev-1-0:~$ cd hwapp
upir@upir-Rev-1-0:~/hwapp$ dotnet new

Welcome to .NET Core!
---------------------
Learn more about .NET Core @ https://aka.ms/dotnet-docs. Use dotnet --help to see available commands or go to https://aka.ms/dotnet-cli-docs.
Telemetry
--------------
The .NET Core tools collect usage data in order to improve your experience. The data is anonymous and does not include commandline arguments. The data is collected by Microsoft and shared with the community.
You can opt out of telemetry by setting a DOTNET_CLI_TELEMETRY_OPTOUT environment variable to 1 using your favorite shell.
You can read more about .NET Core tools telemetry @ https://aka.ms/dotnet-cli-telemetry.
Configuring...
-------------------
A command is running to initially populate your local package cache, to improve restore speed and enable offline access. This command will take up to a minute to complete and will only happen once.
Decompressing 100% 3081 ms
Expanding 100% 7640 ms
Created new C# project in /home/upir/hwapp.
upir@upir-Rev-1-0:~/hwapp$ dotnet restore
log : Restoring packages for /home/upir/hwapp/project.json...
log : Writing lock file to disk. Path: /home/upir/hwapp/project.lock.json
log : /home/upir/hwapp/project.json
log : Restore completed in 1263ms.
upir@upir-Rev-1-0:~/hwapp$ dotnet run
Project hwapp (.NETCoreApp,Version=v1.0) will be compiled because expected outputs are missing
Compiling hwapp for .NETCoreApp,Version=v1.0

Compilation succeeded.
0 Warning(s)
0 Error(s)

Time elapsed 00:00:01.7260079

Hello World!
upir@upir-Rev-1-0:~/hwapp$

posted on 2016-07-31 14:47  风浪  阅读(3085)  评论(0编辑  收藏  举报