모든 패키지에는 “설치 후보가 없습니다” 설치하려고 하면 다음 오류가 발생합니다. Package openssh-server is

openssh-serverUbuntu 14.04 64 비트에 설치하려고 하면 다음 오류가 발생합니다.

Package openssh-server 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 'openssh-server' has no installation candidate

패키지를 설치하려고 할 때 동일한 오류가 표시됩니다.

이것은 sources.list파일입니다.

deb http://archive.canonical.com/ubuntu hardy partner
deb-src http://archive.canonical.com/ubuntu hardy partner


답변

그것이 실제로 /etc/apt/sources.list파일 전체 인 경우 현재 상황을 설명합니다. 왜 하디 저장소가 설치되어 있는지에 대한 설명이 없습니다. 나는 당신이 오래된 튜토리얼을 따랐으며 그것이 깨 졌다고 생각합니다.

첫 번째 단계는 repos를 제자리로 되 돌리는 것입니다. RepoGen 과 같은 도구를 사용 하여 기본 사항을 얻는 것이 좋지만 여기에 실패하는 것이 가장 중요합니다.

deb http://archive.ubuntu.com/ubuntu/ trusty main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-security main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-updates main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-proposed main restricted universe multiverse
deb http://archive.ubuntu.com/ubuntu/ trusty-backports main restricted universe multiverse

올바른 장소에있는 사람들을 sudoedit /etc/apt/sources.list고수하십시오 (강건한 사람들에 대해 그 라인을 버릴 수도 있습니다). 저장되면 실행 sudo apt-get update하면 다시 설치할 수 있습니다.


답변

나는 같은 문제가 있었고, 우분투 소프트웨어 센터를 확인하면서 위의 모든 솔루션을 시도했지만 해결할 수 없었습니다. 나에게 도움이되는 다른 방법을 시도했습니다. 여기 내 해결책이 있습니다

먼저 업데이트 프로세스를 수행하려면 인터넷에 연결되어 있어야합니다.

$sudo apt-get remove openssh-client

$sudo apt-get update

업데이트로 인해 /var/lib/apt/lists/lock파일을 제거 할 수없는 경우 업데이트 프로세스를 다운로드하는 데 도움이됩니다. 그런 다음 작동 해야하는 다음 명령을 실행하십시오.

$sudo apt-get install openssh-server

답변

이 오류 메시지 만에 존재하는 “가상 패키지 ‘나타내는 Provides:다른 패키지의 라인이나에서 언급되는 Depends:, Recommends:또는 Suggests:다른 패키지 (들)의 라인.

‘Provides : openssh-server’가있는 패키지를 나열하려면 다음을 실행하십시오.

aptitude search "?provides(openssh-server)"

우분투 시스템, 아마도 sources.list파일 에 다른 문제가 있다고 생각합니다 . 데비안에서는 적어도 openssh-server는 가상 패키지가 아닌 실제 패키지입니다. 우분투에서 다른 점이 있으면 놀랐습니다.

$ aptitude search "?provides(openssh-server)"
i   openssh-server                  - secure shell (SSH) server, for secure acce
p   openssh-server:i386             - secure shell (SSH) server, for secure acce

답변

나는 같은 문제가 있었고 소스 목록을 반복해서 제거하고 추가했습니다. 결국 외국 아키텍처 armhf 도 설치했으며 문제가 발생했습니다. 먼저 모든 ARM 패키지를 제거한 다음 아키텍처를 제거하십시오.

apt-get purge ".*:<arch>"
dpkg --remove-architecture <arch>

그 후 apt-get update문제없이 실행되었고 마침내 패키지를 다시 업데이트 할 수있었습니다.