日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

Docker---问题1:bash: vi: command not found/bash: vim: command not found

發(fā)布時(shí)間:2023/12/10 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Docker---问题1:bash: vi: command not found/bash: vim: command not found 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

在使用docker時(shí),有時(shí)候我們需要編輯配置文件,需要使用vim或者vi命令,發(fā)現(xiàn):

root@64801a03b121:/etc/nginx/conf.d# vi default.conf bash: vi: command not found root@64801a03b121:/etc/nginx/conf.d# vim default.conf bash: vim: command not found

這是因?yàn)関im沒有安裝,使用如下命令安裝:

root@64801a03b121:/etc/nginx/conf.d# apt-get install vim Reading package lists... Done Building dependency tree Reading state information... Done E: Unable to locate package vim

此時(shí)需要更新:

root@64801a03b121:/etc/nginx/conf.d# apt-get update Get:1 http://security-cdn.debian.org/debian-security buster/updates InRelease [39.1 kB] Get:2 http://cdn-fastly.deb.debian.org/debian buster InRelease [122 kB] Get:4 http://security-cdn.debian.org/debian-security buster/updates/main amd64 Packages [112 kB] Get:3 http://cdn-fastly.deb.debian.org/debian buster-updates InRelease [49.3 kB] Get:5 http://cdn-fastly.deb.debian.org/debian buster/main amd64 Packages [7899 kB] Get:6 http://cdn-fastly.deb.debian.org/debian buster-updates/main amd64 Packages [5792 B] Fetched 8226 kB in 5min 26s (25.2 kB/s) Reading package lists... Done

再次安裝:

root@64801a03b121:/etc/nginx/conf.d# apt-get install vim Reading package lists... Done Building dependency tree Reading state information... Done The following additional packages will be installed:libgpm2 vim-common vim-runtime xxd Suggested packages:gpm ctags vim-doc vim-scripts The following NEW packages will be installed:libgpm2 vim vim-common vim-runtime xxd 0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded. Need to get 7425 kB of archives. After this operation, 33.8 MB of additional disk space will be used. Do you want to continue? [Y/n] y Get:1 http://cdn-fastly.deb.debian.org/debian buster/main amd64 xxd amd64 2:8.1.0875-5 [140 kB] Get:2 http://cdn-fastly.deb.debian.org/debian buster/main amd64 vim-common all 2:8.1.0875-5 [195 kB] Get:3 http://cdn-fastly.deb.debian.org/debian buster/main amd64 libgpm2 amd64 1.20.7-5 [35.1 kB] Get:4 http://cdn-fastly.deb.debian.org/debian buster/main amd64 vim-runtime all 2:8.1.0875-5 [5775 kB] Get:5 http://cdn-fastly.deb.debian.org/debian buster/main amd64 vim amd64 2:8.1.0875-5 [1280 kB] Fetched 7425 kB in 5min 53s (21.1 kB/s) debconf: delaying package configuration, since apt-utils is not installed Selecting previously unselected package xxd. (Reading database ... 7203 files and directories currently installed.) Preparing to unpack .../xxd_2%3a8.1.0875-5_amd64.deb ... Unpacking xxd (2:8.1.0875-5) ... Selecting previously unselected package vim-common. Preparing to unpack .../vim-common_2%3a8.1.0875-5_all.deb ... Unpacking vim-common (2:8.1.0875-5) ... Selecting previously unselected package libgpm2:amd64. Preparing to unpack .../libgpm2_1.20.7-5_amd64.deb ... Unpacking libgpm2:amd64 (1.20.7-5) ... Selecting previously unselected package vim-runtime. Preparing to unpack .../vim-runtime_2%3a8.1.0875-5_all.deb ... Adding 'diversion of /usr/share/vim/vim81/doc/help.txt to /usr/share/vim/vim81/doc/help.txt.vim-tiny by vim-runtime' Adding 'diversion of /usr/share/vim/vim81/doc/tags to /usr/share/vim/vim81/doc/tags.vim-tiny by vim-runtime' Unpacking vim-runtime (2:8.1.0875-5) ... Selecting previously unselected package vim. Preparing to unpack .../vim_2%3a8.1.0875-5_amd64.deb ... Unpacking vim (2:8.1.0875-5) ... Setting up libgpm2:amd64 (1.20.7-5) ... Setting up xxd (2:8.1.0875-5) ... Setting up vim-common (2:8.1.0875-5) ... Setting up vim-runtime (2:8.1.0875-5) ... Setting up vim (2:8.1.0875-5) ... ... ... ... update-alternatives: warning: skip creation of /usr/share/man/man1/editor.1.gz because associated file /usr/share/man/man1/vim.1.gz (of link group editor) doesn't exist Processing triggers for libc-bin (2.28-10) ...

完成

總結(jié)

以上是生活随笔為你收集整理的Docker---问题1:bash: vi: command not found/bash: vim: command not found的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。