.NET Core 패키지를 설치하려고 하는데 문제가 발생하여 해결 방법을 모르겠습니다.
이 페이지의 단계를 따랐지만 다음 오류가 발생했습니다.https://dotnet.microsoft.com/download/linux-package-manager/ubuntu18-04/sdk-2.1.202
나는 전체 지침을 따랐으며 이것이 내 결과입니다.
$ wget -q https://packages.microsoft.com/config/ubuntu/18/04/packages-microsoft-prod.deb
$ sudo dpkg -i packages-microsoft-prod.deb
(Reading database ... 293869 files and directories currently installed.)
Preparing to unpack packages-misrosoft-prod.deb ...
Unpacking packages-microsoft-prod (1.0-ubuntu18.04.1) over (1.0-ubuntu18.04.1) ...
Setting up packages-microsoft-prod (1.0-ubuntu18.04.1) ...
$ sudo add-apt repository universe
$ sudo apt-get install apt-transport-https
Reading package lists... Done
Building dependency tree
Reading state information... Done
apt-transport-https is already the newest version (1.6.6).
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
$ sudo apt-get update
Hit:1 http://mirror.ufscar.br/mariadb/repo/10.3/ubuntu bionic InRelease
Hit:2 https://repo.skype.com/deb stable InRelease
Hit:3 https://deb.nodesource.com/node_10.x bionic InRelease
Hit:4 https://dl.yarnpkg.com/debian stable InRelease
Hit:5 http://packages.microsoft.com/repos/vscode stable InRelease
Hit:6 https://dl.winehq.org/wine-builds/ubuntu bionic InRelease
Hit:7 https://dl.winehq.org/wine-builds/ubuntu artful InRelease
Hit:9 http://archive.ubuntu.com/ubuntu bionic InRelease
Hit:10 http://archive.canonical.com/ubuntu bionic InRelease
Ign:11 http://dl.google.com/linux/chrome/deb stable InRelease
Ign:12 http://packages.linuxmint.com tara InRelease
Hit:13 https://brave-browser-apt-release.s3.brave.com bionic InRelease
Hit:14 http://archive.ubuntu.com/ubuntu bionic-updates InRelease
Hit:15 http://repository.spotify.com stable InRelease
Hit:16 http://packages.linuxmint.com tara Release
Hit:17 http://dl.google.com/linux/chrome/deb stable Release
Hit:18 http://archive.ubuntu.com/ubuntu bionic-backports InRelease
Hit:21 http://security.ubuntu.com/ubuntu bionic-security Inrelease
Hit:8 https://packagecloud.io/slacktechnologies/slack/debian jessie InRelease
Reading package lists... Done
$ sudo apt-get install dotnet-sdk-2.1.202
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package dotnet-sdk-2.1.202
E: Couldn't find any package by glob 'dotnet-sdk-2.1.202'
E: Couldn't find any package by regex 'dotnet-sdk-2.1.202'
$
내가 뭐 잘못 했어요? 내 기계에 문제가 있는 걸까요?
답변1
패키지 이름이 아닐 수도 있습니다. 이 명령을 사용할 패키지를 검색하고 있다면 apt-cache search
추천합니다.
이 같은
sudo apt-cache search dotnet
그러면 설치한 리포지토리를 기반으로 설명이나 이름에 "dotnet"이 포함된 모든 패키지를 찾아야 합니다.
답변2
해결책을 찾았습니다. 먼저 루트를 사용하여 설치하십시오. Unbutun 18.04를 사용하는 경우 다음 스크립트도 미리 추가해야 합니다.
wget -qO- https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor > microsoft.asc.gpg
sudo mv microsoft.asc.gpg /etc/apt/trusted.gpg.d/
wget -q https://packages.microsoft.com/config/ubuntu/18.04/prod.list
sudo mv prod.list /etc/apt/sources.list.d/microsoft-prod.list
add-apt-repository universe
apt-get install apt-transport-https
apt-get update
apt-get install dotnet-sdk-2.1.202
출처는 다음과 같습니다.