微软官方安装方法

1
2
3
4
5
wget -q https://packages.microsoft.com/config/ubuntu/16.04/packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
sudo apt-get update
sudo apt-get install aspnetcore-runtime-2.1
后发现:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
root@DESKTOP-ME54PJV:/home/xxoo# sudo apt-get install aspnetcore-runtime-2.1
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
dotnet-sdk-2.1 : Depends: dotnet-runtime-2.1 (>= 2.1.4) but it is not going to be installed
Depends: aspnetcore-runtime-2.1 (>= 2.1.4) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
  • 解决方法:
    1
    2
    apt install aptitude
    aptitude install
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
root@DESKTOP-ME54PJV:/home/xxoo# sudo apt-get install aspnetcore-runtime-2.1
The following NEW packages will be installed:
aspnetcore-runtime-2.1{a} dotnet-host{a} dotnet-hostfxr-2.1{a} dotnet-runtime-2.1{a} dotnet-runtime-deps-2.1{ab} dotnet-sdk-2.1
0 packages upgraded, 6 newly installed, 0 to remove and 0 not upgraded.
Need to get 132 MB of archives. After unpacking 380 MB will be used.
The following packages have unmet dependencies:
dotnet-runtime-deps-2.1 : Depends: libicu55 which is a virtual package and is not provided by any available package
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) aspnetcore-runtime-2.1 [Not Installed]
2) dotnet-runtime-2.1 [Not Installed]
3) dotnet-runtime-deps-2.1 [Not Installed]
4) dotnet-sdk-2.1 [Not Installed]
Accept this solution? [Y/n/q/?] Y
No packages will be installed, upgraded, or removed.
0 packages upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
Need to get 0 B of archives. After unpacking 0 B will be used.
libicu55 没有源可以提供
/etc/apt/sources.list中加入
deb http://security.ubuntu.com/ubuntu xenial-security main
apt update
apt install aspnetcore-runtime-2.1
即可
root@DESKTOP-ME54PJV:/home/xxoo# dotnet --version
2.1.402

留言

2018-09-25

⬆︎TOP