Unable to install vim or nano inside docker container

后端 未结 6 1996
失恋的感觉
失恋的感觉 2021-02-01 03:11

Trying to install inside a docker, either vim or nano but I only get this:

0% [Connecting to archive.ubuntu.com (91.189.88.152)]

Exit docker an

6条回答
  •  长情又很酷
    2021-02-01 03:38

    Absolutely no luck at all with apt or apt-get. The docker I am using from someone else doesn't seem to have the /etc/apt sources configured correct (or disabled). I need to edit the configurations.

    Luckily dpkg and curl are available inside the container. I used the binaries for my amd64. https://launchpad.net/ubuntu/+source/vim/2:7.4.712-2ubuntu4

    mkdir /tmp/vim cd /tmp/vim

    curl http://launchpadlibrarian.net/221875822/vim_7.4.712-2ubuntu4_amd64.deb > vim.deb curl http://launchpadlibrarian.net/221873815/vim-common_7.4.712-2ubuntu4_arm64.deb > vim-common.deb curl http://launchpadlibrarian.net/221875814/vim-runtime_7.4.712-2ubuntu4_all.deb > vim-runtime.deb curl https://launchpad.net/ubuntu/wily/amd64/vim/2:7.4.712-2ubuntu4 > vim.deb curl http://mirrors.kernel.org/ubuntu/pool/main/g/gpm/libgpm2_1.20.4-6.1_amd64.deb > libgpm2.deb

    dpkg -i *.deb

    It's not the best solution, but at least now I can edit the configuration files.

提交回复
热议问题