패키지 'dotnet-sdk-7.0'에는 Xubuntu/Ubuntu 22.04에 설치 후보가 없습니다.

패키지 'dotnet-sdk-7.0'에는 Xubuntu/Ubuntu 22.04에 설치 후보가 없습니다.

나는 선생님의 지시를 따랐다.여기Ubuntu 피드에서 .NET 6 SDK를 설치한 후 .NET 7 SDK를 설치합니다.

wget https://packages.microsoft.com/config/ubuntu/22.04/packages-microsoft-prod.deb -O packages-microsoft-prod.deb
sudo dpkg -i packages-microsoft-prod.deb
rm packages-microsoft-prod.deb

sudo apt-get update && sudo apt-get install dotnet-sdk-7.0다음 오류가 발생합니다.

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package dotnet-sdk-7.0 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'dotnet-sdk-7.0' has no installation candidate

sudo apt show dotnet-sdk-7.0 -a결과는 다음과 같습니다.

Package: dotnet-sdk-7.0
Version: 7.0.102-1
Priority: standard
Section: devel
Maintainer: Microsoft <[email protected]>
Installed-Size: 358 MB
Depends: aspnetcore-targeting-pack-7.0 (>= 7.0.2), netstandard-targeting-pack-2.1 (>= 2.1.0), dotnet-apphost-pack-7.0 (>= 7.0.2), dotnet-runtime-7.0 (>= 7.0.2), dotnet-targeting-pack-7.0 (>= 7.0.2), aspnetcore-runtime-7.0 (>= 7.0.2)
Homepage: https://github.com/dotnet/core
Download-Size: 90,6 MB
APT-Sources: https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages
Description: Microsoft .NET SDK 7.0.102
 .NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.

Package: dotnet-sdk-7.0
Version: 7.0.101-1
Priority: standard
Section: devel
Maintainer: Microsoft <[email protected]>
Installed-Size: 358 MB
Depends: aspnetcore-targeting-pack-7.0 (>= 7.0.1), netstandard-targeting-pack-2.1 (>= 2.1.0), dotnet-apphost-pack-7.0 (>= 7.0.1), dotnet-runtime-7.0 (>= 7.0.1), dotnet-targeting-pack-7.0 (>= 7.0.1), aspnetcore-runtime-7.0 (>= 7.0.1)
Homepage: https://github.com/dotnet/core
Download-Size: 90,6 MB
APT-Sources: https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages
Description: Microsoft .NET SDK 7.0.101
 .NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.

Package: dotnet-sdk-7.0
Version: 7.0.100-1
Priority: standard
Section: devel
Maintainer: Microsoft <[email protected]>
Installed-Size: 352 MB
Depends: aspnetcore-targeting-pack-7.0 (>= 7.0.0), netstandard-targeting-pack-2.1 (>= 2.1.0), dotnet-apphost-pack-7.0 (>= 7.0.0), dotnet-runtime-7.0 (>= 7.0.0), dotnet-targeting-pack-7.0 (>= 7.0.0), aspnetcore-runtime-7.0 (>= 7.0.0)
Homepage: https://github.com/dotnet/core
Download-Size: 88,4 MB
APT-Sources: https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages
Description: Microsoft .NET SDK 7.0.100
 .NET is a development platform that you can use to build command-line applications, microservices and modern websites. It is open source, cross-platform and is supported by Microsoft. We hope you enjoy using it! If you do, please consider joining the active community of developers that are contributing to the project on GitHub (https://github.com/dotnet/core). We happily accept issues and PRs.

또한 시도apt-get upgrade

/etc/apt/sources.list.d/microsoft-prod.list다음을 포함합니다:

deb [arch=amd64,arm64,armhf] https://packages.microsoft.com/ubuntu/22.04/prod jammy main

apt policy dotnet-sdk-7.0쇼:

dotnet-sdk-7.0:
  Installed: (none)
  Candidate: (none)
  Version table:
     7.0.102-1 -10
        500 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages
     7.0.101-1 -10
        500 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages
     7.0.100-1 -10
        500 https://packages.microsoft.com/ubuntu/22.04/prod jammy/main amd64 Packages

/etc/apt/preferences설명된 대로 파일을 추가하면 .NET 7 SDK 설치가 작동하도록 할 수 있습니다.여기:

Package: dotnet-sdk-7.0
Pin: origin "packages.microsoft.com"
Pin-Priority: 999

그러나 .NET 6 SDK가 작동을 멈췄습니다.

관련 정보