E : Debian jessie 단순화 Docker 컨테이너에서 vim 패키지를 찾을 수 없습니다


21

jessie를 실행하는 데비안 도커 컨테이너 내부에서

vi blah
bash: vi: command not found

당연히 설치 명령에 도달합니다

sudo apt-get install vim

Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package vim

몇 가지 견인을 검색하는 동안 다양한 출력으로 이러한 제안을 발견했습니다.

        cat /etc/apt/sources.list
deb http://deb.debian.org/debian jessie main
deb http://deb.debian.org/debian jessie-updates main
deb http://security.debian.org jessie/updates main

        apt-get install software-properties-common
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package software-properties-common

        apt-get install python-software-properties
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package python-software-properties


        apt-get install apt-file
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package apt-file

이 서버는 몽고 이미지의 도커 컨테이너이므로 의도적으로 베어 본 데비안 설치입니다 ... vi를 설치하는 것은 개발하는 동안 재생됩니다

답변:


46

이 솔루션을 찾았습니다

apt-get update

apt-get install apt-file

apt-file update

apt-get install vim     # now finally this will work !!!

위의 사본 N 붙여 넣기 버전은 다음과 같습니다.

apt-get update && apt-get install apt-file -y && apt-file update && apt-get install vim -y

3
완벽 .. 방금이 단계들을 맹목적으로 따라 갔다. 그것은 효과가 있었다.
raksja

1
마지막 줄 내 시간 덕분에 감사합니다 ... 이것은 두 번째입니다 ...이 답변이 도움이되었습니다
saber tabatabaee yazdi

1
이것은 나를 위해 잘 작동했습니다. apt-get update그때 해야 할 일은apt-get install ...
Jeff Whiting

12

하지만 스콧 Stensland응답 작품, 당신은 설치할 필요가 없습니다 software-properties-commonpython-software-properties. 다음 명령 만 실행하면 충분합니다.

apt-get update
apt-get install apt-file
apt-file update
apt-get install vim

이것은 나를 위해 작동합니다 ..
Arman Ortega

잘 모든 것을 설치하지 않는 등이 하나 개의 작품 software-properties-commonpython-software-properties가져올 것이다.
TheVillageIdiot
당사 사이트를 사용함과 동시에 당사의 쿠키 정책개인정보 보호정책을 읽고 이해하였음을 인정하는 것으로 간주합니다.
Licensed under cc by-sa 3.0 with attribution required.