Detailed explanation of vi command installation in docker container in linux

When using the docker container, and when the system in your docker happens to be debian or ubuntu, sometimes vim is not installed in it, and when you type the vim command, the prompt says: vim: command not found, you need to install vim at this time, but when you When typing the apt-get install vim command, it prompts:

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


At this time, you need to type: apt-get update. The function of this command is to synchronize the indexes of the sources listed in /etc/apt/sources.list and /etc/apt/sources.list.d, so that the latest version can be obtained. package.

After the update is complete, type the command:

The apt-get install vim command can be used.

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324888149&siteId=291194637