Unable to install vim or nano inside docker container

后端 未结 6 1967
失恋的感觉
失恋的感觉 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:41

    Here is how you can use wget to fetch and install a nano lib or binary or whatever it was called and then use it in to edit a file in the python:latest image.

    $ cd ~
    $ wget http://www.nano-editor.org/dist/v2.4/nano-2.4.2.tar.gz
    
    $ tar -xzf nano-2.4.2.tar.gz
    $ cd nano-2.4.2
    $ ./configure
    $ make
    $ make install  # removed sudo from this line
    

    test it

    $ touch file
    $ nano file
    # close with `ctrl+z enter`
    $ rm file # delete that test file
    

    UPDATE: apt-get worked for me... I bet other people weren't running update first.

    $ apt-get update
    $ apt-get install nano
    

提交回复
热议问题