E:Debian jessie単純化されたDockerコンテナにvimパッケージが見つかりません。

E:Debian jessie単純化されたDockerコンテナにvimパッケージが見つかりません。

jessieを実行しているDebian Dockerコンテナでは、私は次のようになります。

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

このサーバーはmongoイメージのDockerコンテナなので、意図的に簡単なDebianインストールです...開発中に遊ぶためにviをインストールします。

ベストアンサー1

この解決策を見つけました

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

回避策...新しいファイルを作成する必要がある場合は、利用可能なエディタがない場合に実行してください。

cat > myfile
(use terminal to copy/paste)
^D

おすすめ記事