首页 > 系统相关 >VMware:Package vim is not available, but is referred to by another package.

VMware:Package vim is not available, but is referred to by another package.

时间:2023-07-07 21:00:22浏览次数:40  
标签:available universe package restricted ubuntu Package edu main multiverse

出错语句

在ubuntu中输入sudo apt-get install vim安装vim时出现如下错误语句

Reading package lists... Done
Building dependency tree       
Reading state information... Done
Package vim is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source

E: Package 'vim' has no installation candidate

原因

ubuntu的路径 /etc/apt下的文件source.list中的源太老了。

解决

1、备份原文件

sudo cp /etc/apt/sources.list /etc/apt/sources.list.backup

2、修改

sudo gedit /etc/apt/sources.list

清空文档,替换为清华源:

# 默认注释了源码镜像以提高 apt update 速度,如有需要可自行取消注释
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-updates main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-backports main restricted universe multiverse
deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-security main restricted universe multiverse

# 预发布软件源,不建议启用
# deb https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse
# deb-src https://mirrors.tuna.tsinghua.edu.cn/ubuntu/ focal-proposed main restricted universe multiverse

3、更新apt-get

sudo apt-get update

4、安装vim

sudo apt-get install vim

 

标签:available,universe,package,restricted,ubuntu,Package,edu,main,multiverse
From: https://www.cnblogs.com/ShineLeBlog/p/17536052.html

相关文章

  • Python 引用问题 - ImportError: attempted relative import with no known parent pa
    问题描述近日在尝试引用其他文件的代码时,遇到了错误:ImportError:attemptedrelativeimportwithnoknownparentpackage.问题大致是这样的:我想在code2.py中引用code1.py的函数,如from..folder1.code1importxxx,运行code2.py时出现错误。root├──folder1│......
  • std::future、std::promise、std::packaged_task、std::async
    std::promisestd::promise:用于获取线程中变量的结果,如下:#include<iostream>#include<thread>#include<future>voidprintMessage(std::promise<std::string>&&prms,std::stringmessage){std::this_thread::sleep_for(std::chrono::sec......
  • package com.ws.byd.bmgl.bmzdpz:编码字典------bydobject
    controller:packagecom.ws.byd.bmgl.bmzdpz.controller;importjava.util.HashMap;importjava.util.List;importjava.util.Map;importjavax.servlet.http.HttpServletRequest;importjavax.servlet.http.HttpServletResponse;importorg.apache.commons.lang.O......
  • No bean named 'transactionManager' available: No matching PlatformTransactionMan
    报错内容:找不到transactionManager原因:xml配置平台事务管理器的时候给了id。配置@Transaction注解时没有配置transactionManager 解决方案:将xml中配置的id="tranManager"改为id="transactionManager"。原因是因为@Transaction中transactionManager的默认名称是”transactionM......
  • package.json指南
    一、属性name定义项目的名称,不能以"."和"_"开头,不能包含大写字母version定义项目的版本号,格式为:大版本号.次版本号.修订号description项目的描述二、配置dependencies生产环境的依赖包如果不使用脱字符(^),安装的版本号固定;如果使用,则能安装当前大版本的最新版本,在......
  • pip3 Defaulting to user installation because normal site-packages is not writeab
    Defaultingtouserinstallationbecausenormalsite-packagesisnotwriteable原因:没有操作site-packages目录权限解决方法:命令前加上sudosudopip3installCommandNotFound......
  • Springboot No bean named 'XXXXX' available 问题解决
    一、问题描述近日在工作中遇见了一个bug,后端程序频频报错Nobeannamed'XXXXX'available。对比同类程序文件,没有发现有任何特殊之处。在网上搜索方法基本上就是扫描包配置、注解问题、路径问题等,皆不能解决我的问题。排查问题是发现出现问题的类命名不符合驼峰规范,按照这个......
  • HikariPool-1 - Connection is not available
       在springboot项目中出现一个问题,该问题从字面意思上说是数据链池链接资源已全部使用完毕,没有可用的链接使用排查问题发现原因是:sql由于参数填写错误,进行了全表扫描,由于返回数据量过大导致数据卡在映射层,导致资源卡死的情况,每调用一次就会损失一个链接资源,当所有链......
  • vue项目中的package.json的private选项的作用
    {"name":"项目名称","description":"描述","version":"版本","private":true,"author":"testTeam","license":"MIT",}如果你在你的package.j......
  • react-native项目启动报错 Error: `fsevents` unavailable (this watcher can only be
    react-native项目启动报错——watchman安装问题(macpro) LookingforJSfilesin/Users/你的名称/Documents/project/文件夹名Loadingdependencygraph.../Users/你的名称/Documents/project/文件夹名/node_modules/metro/node_modules/sane/src/fsevents_watcher.js:37......