广告
返回顶部
首页 > 资讯 > 精选 >docker容器无法执行vim如何解决
  • 953
分享到

docker容器无法执行vim如何解决

2023-07-06 13:07:18 953人浏览 泡泡鱼
摘要

本篇文章和大家了解一下Docker容器无法执行vim如何解决。有一定的参考价值,有需要的朋友可以参考一下,希望对大家有所帮助。目录docker容器无法执行vim【已解决】docker容器中执行vim失败安装文件没更换之前,速度非常的慢【失败

本篇文章和大家了解一下Docker容器无法执行vim如何解决。有一定的参考价值,有需要的朋友可以参考一下,希望对大家有所帮助。

目录
  • docker容器无法执行vim【已解决】

  • docker容器中执行vim失败

  • 安装文件

    • 没更换之前,速度非常的慢

    • 【失败】这里我更换了163的但是报错

    • 【失败】这里我更换了阿里的第一种报错

    • 【成功】::::这里我更换了阿里的第二种成功

  • 完整步骤

    • 备份配置

    • 修改配置

    • 检查配置

    • 执行:apt-get update

    • 执行:apt-get install -y vim

    • 验证

  • 参考资料:

    docker容器无法执行vim【已解决】

    解决问题直接看完整步骤目录

    docker容器中执行vim失败

    bash: ll: command not found
    bash: vim: command not found
    bash: vi: command not found
    安装vim依旧报错

    docker容器无法执行vim如何解决

    我的版本 cat /etc/debian_version
    11.2

    安装文件

    # 正常步骤,但是第一步下载非常慢,需要更换一下地址1:apt-get update2: apt-get install -y vim

    没更换之前,速度非常的慢

    docker容器无法执行vim如何解决

    【失败】这里我更换了163的但是报错

    Ign:1 Http://mirrors.163.com/debian jessie InRelease
    Ign:2 http://mirrors.163.com/debian jessie-proposed-updates InRelease
    Ign:3 http://mirrors.163.com/debian jessie-updates InRelease
    Ign:4 http://mirrors.163.com/debian jessie-backports InRelease
    Ign:5 http://mirrors.163.com/debian-security jessie/updates InRelease
    Get:6 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease [116 kB]
    Err:7 http://mirrors.163.com/debian jessie Release
    404 Not Found [IP: 101.71.33.11 80]
    Err:8 http://mirrors.163.com/debian jessie-proposed-updates Release
    404 Not Found [IP: 101.71.33.11 80]
    Err:9 http://mirrors.163.com/debian jessie-updates Release
    404 Not Found [IP: 101.71.33.11 80]
    Err:10 http://mirrors.163.com/debian jessie-backports Release
    404 Not Found [IP: 101.71.33.11 80]
    Err:11 http://mirrors.163.com/debian-security jessie/updates Release
    404 Not Found [IP: 101.71.33.11 80]
    Reading package lists... Done
    E: The repository 'http://mirrors.163.com/debian jessie Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: The repository 'http://mirrors.163.com/debian jessie-proposed-updates Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: The repository 'http://mirrors.163.com/debian jessie-updates Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: The repository 'http://mirrors.163.com/debian jessie-backports Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: The repository 'http://mirrors.163.com/debian-security jessie/updates Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.

    docker容器无法执行vim如何解决

    【失败】这里我更换了阿里的第一种报错

    root@a7e7ebb2ecad:/var/lib/apt/lists# echo -e "deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib \ndeb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib \ndeb http://mirrors.aliyun.com/debian-security stretch/updates main \ndeb-src http://mirrors.aliyun.com/debian-security stretch/updates main \ndeb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib \ndeb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib \ndeb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib \ndeb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib" > /etc/apt/sources.list
    root@a7e7ebb2ecad:/var/lib/apt/lists#
    root@a7e7ebb2ecad:/var/lib/apt/lists# cat /etc/apt/sources.list
    deb http://mirrors.aliyun.com/debian/ stretch main non-free contrib
    deb-src http://mirrors.aliyun.com/debian/ stretch main non-free contrib
    deb http://mirrors.aliyun.com/debian-security stretch/updates main
    deb-src http://mirrors.aliyun.com/debian-security stretch/updates main
    deb http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
    deb-src http://mirrors.aliyun.com/debian/ stretch-updates main non-free contrib
    deb http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
    deb-src http://mirrors.aliyun.com/debian/ stretch-backports main non-free contrib
    root@a7e7ebb2ecad:/var/lib/apt/lists# apt-get update
    Ign:1 http://mirrors.aliyun.com/debian stretch InRelease
    Ign:2 http://mirrors.aliyun.com/debian-security stretch/updates InRelease
    Ign:3 http://mirrors.aliyun.com/debian stretch-updates InRelease
    Ign:4 http://mirrors.aliyun.com/debian stretch-backports InRelease
    Get:5 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease [116 kB]
    Err:6 http://mirrors.aliyun.com/debian stretch Release
    404 Not Found [IP: 60.28.226.53 80]
    Err:7 http://mirrors.aliyun.com/debian-security stretch/updates Release
    404 Not Found [IP: 60.28.226.53 80]
    Err:8 http://mirrors.aliyun.com/debian stretch-updates Release
    404 Not Found [IP: 60.28.226.53 80]
    Err:9 http://mirrors.aliyun.com/debian stretch-backports Release
    404 Not Found [IP: 60.28.226.53 80]
    Reading package lists... Done
    E: The repository 'http://mirrors.aliyun.com/debian stretch Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: The repository 'http://mirrors.aliyun.com/debian-security stretch/updates Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: The repository 'http://mirrors.aliyun.com/debian stretch-updates Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.
    E: The repository 'http://mirrors.aliyun.com/debian stretch-backports Release' does not have a Release file.
    N: Updating from such a repository can't be done securely, and is therefore disabled by default.
    N: See apt-secure(8) manpage for repository creation and user configuration details.

    docker容器无法执行vim如何解决

    【成功】::::这里我更换了阿里的第二种成功

    #Aliyun Apt Source 阿里云镜像源echo "deb http://mirrors.aliyun.com/debian/ bullseye main contrib" >> /etc/apt/sources.listecho "deb-src http://mirrors.aliyun.com/debian/ bullseye main contrib" >> /etc/apt/sources.listecho "deb http://mirrors.aliyun.com/debian/ bullseye-updates main contrib" >> /etc/apt/sources.listecho "deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main contrib" >> /etc/apt/sources.listecho "deb http://mirrors.aliyun.com/debian/ bullseye-backports main contrib" >> /etc/apt/sources.listecho "deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main contrib" >> /etc/apt/sources.listecho "deb http://mirrors.aliyun.com/debian/ bullseye-proposed-updates main contrib" >> /etc/apt/sources.listecho "deb-src http://mirrors.aliyun.com/debian/ bullseye-proposed-updates main contrib" >> /etc/apt/sources.list
    root@a7e7ebb2ecad:/# apt-get updateGet:1 http://mirrors.aliyun.com/debian bullseye InRelease [116 kB]Get:2 http://mirrors.aliyun.com/debian bullseye-updates InRelease [44.1 kB]           Get:3 http://mirrors.aliyun.com/debian bullseye-backports InRelease [49.0 kB]Get:4 http://apt.postgresql.org/pub/repos/apt bullseye-pgdg InRelease [116 kB]Get:5 http://mirrors.aliyun.com/debian bullseye-proposed-updates InRelease [54.0 kB]Get:6 http://mirrors.aliyun.com/debian bullseye/contrib Sources [43.2 kB]Get:7 http://mirrors.aliyun.com/debian bullseye/main Sources [8,637 kB]        Get:8 http://mirrors.aliyun.com/debian bullseye/main amd64 Packages [8,183 kB]Get:9 http://mirrors.aliyun.com/debian bullseye/contrib amd64 Packages [50.6 kB]Get:10 http://mirrors.aliyun.com/debian bullseye-updates/main Sources [4,812 B]Get:11 http://mirrors.aliyun.com/debian bullseye-updates/main amd64 Packages [14.6 kB]Get:12 http://mirrors.aliyun.com/debian bullseye-backports/main Sources [429 kB]Get:13 http://mirrors.aliyun.com/debian bullseye-backports/contrib Sources [4,280 B]Get:14 http://mirrors.aliyun.com/debian bullseye-backports/main amd64 Packages [419 kB]Get:15 http://mirrors.aliyun.com/debian bullseye-backports/contrib amd64 Packages [5,692 B]Get:16 http://mirrors.aliyun.com/debian bullseye-proposed-updates/main Sources [8,072 B]Get:17 http://mirrors.aliyun.com/debian bullseye-proposed-updates/main amd64 Packages [29.3 kB]Fetched 18.2 MB in 6s (2,999 kB/s)                                                                                                                                                              Reading package lists... Done

    docker容器无法执行vim如何解决

    完整步骤

    1:备份配置

    cp /etc/apt/sources.list /etc/apt/sources.list.bak

    2:修改配置

    # Aliyun Apt Source 阿里云镜像源echo "deb http://mirrors.aliyun.com/debian/ bullseye main contrib" >> /etc/apt/sources.listecho "deb-src http://mirrors.aliyun.com/debian/ bullseye main contrib" >> /etc/apt/sources.listecho "deb http://mirrors.aliyun.com/debian/ bullseye-updates main contrib" >> /etc/apt/sources.listecho "deb-src http://mirrors.aliyun.com/debian/ bullseye-updates main contrib" >> /etc/apt/sources.listecho "deb http://mirrors.aliyun.com/debian/ bullseye-backports main contrib" >> /etc/apt/sources.listecho "deb-src http://mirrors.aliyun.com/debian/ bullseye-backports main contrib" >> /etc/apt/sources.listecho "deb http://mirrors.aliyun.com/debian/ bullseye-proposed-updates main contrib" >> /etc/apt/sources.listecho "deb-src http://mirrors.aliyun.com/debian/ bullseye-proposed-updates main contrib" >> /etc/apt/sources.list

    3:检查配置

    cat /etc/apt/sources.list

    docker容器无法执行vim如何解决

    4:执行:apt-get update

    docker容器无法执行vim如何解决

    5:执行:apt-get install -y vim

    6:验证

    vim /etc/hosts

    docker容器无法执行vim如何解决

    以上就是docker容器无法执行vim如何解决的简略介绍,当然详细使用上面的不同还得要大家自己使用过才领会。如果想了解更多,欢迎关注编程网精选频道哦!

    --结束END--

    本文标题: docker容器无法执行vim如何解决

    本文链接: https://www.lsjlt.com/news/358558.html(转载时请注明来源链接)

    有问题或投稿请发送至: 邮箱/279061341@qq.com    QQ/279061341

    本篇文章演示代码以及资料文档资料下载

    下载Word文档到电脑,方便收藏和打印~

    下载Word文档
    猜你喜欢
    • docker容器无法执行vim如何解决
      本篇文章和大家了解一下docker容器无法执行vim如何解决。有一定的参考价值,有需要的朋友可以参考一下,希望对大家有所帮助。目录docker容器无法执行vim【已解决】docker容器中执行vim失败安装文件没更换之前,速度非常的慢【失败...
      99+
      2023-07-06
    • docker容器无法执行vim的解决方案
      目录docker容器无法执行vim【已解决】docker容器中执行vim失败安装文件没更换之前,速度非常的慢【失败】这里我更换了163的但是报错【失败】这里我更换了阿里的第一种报错【...
      99+
      2023-05-20
      docker容器无法执行vim docker无法执行vim docker vim
    • Docker中Mysql容器无法停止无法删除如何解决
      这篇文章主要介绍“Docker中Mysql容器无法停止无法删除如何解决”,在日常操作中,相信很多人在Docker中Mysql容器无法停止无法删除如何解决问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Docke...
      99+
      2023-07-05
    • php exec无法执行如何解决
      这篇文章主要介绍“php exec无法执行如何解决”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“php exec无法执行如何解决”文章能帮助大家解决问题。php exec无法执行的解决办法:1、找到...
      99+
      2023-07-04
    • xampp无法执行php如何解决
      这篇文章主要介绍“xampp无法执行php如何解决”的相关知识,小编通过实际案例向大家展示操作过程,操作方法简单快捷,实用性强,希望这篇“xampp无法执行php如何解决”文章能帮助大家解决问题。问题背景当我们使用 XAMPP 运行 PHP...
      99+
      2023-07-05
    • 解决docker容器无法访问的问题
      服务器上的docker容器都无法访问了,而且裸机部署的应用则没有任务问题。 docker容器重启多次均无法访问!!! docker服务重启也无济于事!!! 服务器网卡重启也不行!!! 网上搜了一堆方法...
      99+
      2023-09-14
      docker 服务器 运维
    • windows下winrar无法执行如何解决
      这篇文章主要介绍“windows下winrar无法执行如何解决”,在日常操作中,相信很多人在windows下winrar无法执行如何解决问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”windows下winra...
      99+
      2023-07-04
    • 无法在php中执行python如何解决
      今天就跟大家聊聊有关无法在php中执行python如何解决,可能很多人都不太了解,为了让大家更加了解,小编给大家总结了以下内容,希望大家根据这篇文章可以有所收获。php无法执行python要用php执行python命令,发现命令行可以正常输...
      99+
      2023-06-15
    • docker创建容器后无法启动怎么解决
      如果在创建 Docker 容器后无法启动,可以尝试以下几个解决方法: 查看容器状态:运行 `docker ps -a` 命令,查...
      99+
      2023-10-26
      docker
    • Docker容器无法停止删除的解决方案
      查找运行的容器id docker ps 查找上面容器的物理位置 cd /var/lib/docker/container ls -a #此处会显示所有容器的id,找出上面那...
      99+
      2022-11-11
    • docker nginx运行后无法访问如何解决
      今天小编给大家分享一下docker nginx运行后无法访问如何解决的相关知识点,内容详细,逻辑清晰,相信大部分人都还太了解这方面的知识,所以分享这篇文章给大家参考一下,希望大家阅读完这篇文章后有所收获,下...
      99+
      2022-10-19
    • linux安装vim无法解析域名如何解决
      在Linux上安装vim时无法解析域名的问题通常与DNS设置有关。以下是一些可能的解决方法:1. 检查网络连接:确保您的Linux系...
      99+
      2023-10-26
      linux
    • 为什么PHP无法异步执行?如何解决?
      PHP是一种常用的编程语言,许多Web应用程序都是用PHP编写的。但是,PHP有一个明显的限制,就是它无法异步执行代码,这使得PHP在一些高并发场景下效率低下,难以满足对性能的要求。什么是异步执行?在传统的同步编程中,代码在执行时是按照顺序...
      99+
      2023-05-14
      php 异步
    • Docker容器/bin/bash start.sh无法找到not found问题解决
      目录项目场景:问题描述造成原因解决方案总结项目场景: 记一次Dockerfile构建的Docker镜像,启动容器时sh: not found的问题 Dockerfile构建的Dock...
      99+
      2022-11-13
      docker start.sh无法找到 docker run bin/bash docker容器/bin/bash
    • Docker Hello World容器运行报错的解决办法
      费了好大力气从Docker官网下载了Docker Community Editor的安装镜像,Docker.dmg, 总共将近500MB,双击进行安装:命令行里使用docker version查看版本:然后使用命令行docker run h...
      99+
      2023-06-05
    • win10资源保护无法执行请求如何解决
      Win10资源保护无法执行请求可能是由于系统文件损坏或权限问题引起的。以下是一些解决方法:1. 运行系统文件检查工具:按下Win +...
      99+
      2023-09-08
      win10
    • docker本地无法访问如何解决
      要解决 Docker 本地无法访问的问题,可以尝试以下几个步骤:1. 检查 Docker 容器是否正常运行:可以使用 `docker ps` 命令查看正在运行的容器列表,确保容器处于运行状态。2. 检查容器的网络设置:可以使用 `doc...
      99+
      2023-08-11
      docker
    • docker容器中无法获取宿主机hostname的解决方案
      在nodejs环境中测试通过,其它语言同理,只需要使用获取环境变量的方法即可。 思路: docker容器和宿主机环境是隔离的,但是可以在启动docker容器时将宿主机的主机名以环境变...
      99+
      2022-11-11
    • Ubuntu无法安装vim文本编辑器的问题如何解决
      这篇文章主要介绍“Ubuntu无法安装vim文本编辑器的问题如何解决”,在日常操作中,相信很多人在Ubuntu无法安装vim文本编辑器的问题如何解决问题上存在疑惑,小编查阅了各式资料,整理出简单好用的操作方法,希望对大家解答”Ubuntu无...
      99+
      2023-06-13
    • 无法在Centos8中安装docker如何解决
      无法在Centos8中安装docker如何解决?针对这个问题,这篇文章详细介绍了相对应的分析和解答,希望可以帮助更多想解决这个问题的小伙伴找到更简单易行的方法。出现问题[root@zh ~]# [root@zh ...
      99+
      2023-06-14
    软考高级职称资格查询
    编程网,编程工程师的家园,是目前国内优秀的开源技术社区之一,形成了由开源软件库、代码分享、资讯、协作翻译、讨论区和博客等几大频道内容,为IT开发者提供了一个发现、使用、并交流开源技术的平台。
    • 官方手机版

    • 微信公众号

    • 商务合作