Package xxx is not available, but is referred to by another package
这个问题的原因是ubuntu的/etc/apt/source.list中的源比较旧了,需要更新一下,
更新源之后,再更新:
sudo apt-get -y update
Ps:参考第二个链接修改/etc/apt/sources.list,添加如下:
deb http://ftp.de.debian.org/debian stretch main
deb http://ftp.cn.debian.org/debian stretch main
如果是vim:
更新完毕之后,再使用 sudo apt-get install vim 安装应该就没有问题了。
如果还有问题,就说明你的源有问题->
1.保险做法先备份源文件: cp -i /etc/apt/sources.list /etc/apt/sources.list_backup
2.打开sources.list: sudo gedit /etc/apt/sources.list
3.在源文件中复制粘贴如下阿里云的源到文件的最前边,然后保存退出。
deb-src http://archive.ubuntu.com/ubuntu xenial main restricted #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-updates main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates universe
deb http://mirrors.aliyun.com/ubuntu/ xenial multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-updates multiverse
deb http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-backports main restricted universe multiverse #Added by software-properties
deb http://archive.canonical.com/ubuntu xenial partner
deb-src http://archive.canonical.com/ubuntu xenial partner
deb http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted
deb-src http://mirrors.aliyun.com/ubuntu/ xenial-security main restricted multiverse universe #Added by software-properties
deb http://mirrors.aliyun.com/ubuntu/ xenial-security universe
deb http://mirrors.aliyun.com/ubuntu/ xenial-security multiverse
4.更新:sudo apt-get update
5.更新后,再安装vim,sudo apt-get install vim
这次应该就没有问题了。
————————————————
版权声明:本文为CSDN博主「www_helloworld_com」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/www_helloworld_com/article/details/84778641
Package xxx is not available, but is referred to by another package相关推荐
- ubuntu进行apt-get时候出现Package ssh is not available, but is referred to by another package 错误...
今天在ubuntu进行ssh安装的时候,出现如下错误. Reading package lists... Done Building dependency tree... Done Package s ...
- Package vim is not available, but is referred to by another package.
在使用虚拟机安装好UBUNTU 后,启动终端,输入sudo apt-get install vim 却出现下面到错误, Package vim is not available, but is re ...
- 报错package xxx is not in GOROOT or GOPATH 或者 cannot find package “xxx“ in any of
动态演示图见 博客 GO111MODULE="off" 在GO111MODULE="off"的条件下,并且写的代码不在$GOPATH/src下,也就是说下面的m ...
- 【收藏】goland报错:报错package xxx is not in GOROOT or GOPATH 或者 cannot find package “xxx“ in any of
其实,通过go run main.go命令也可以正常运行 https://blog.csdn.net/weixin_44676081/article/details/107279746
- maven多项目打包报错---子模块相互依赖打包时所遇到的问题:依赖的程序包找不到 package xxx does not exist
场景: springboot 项目多模块已成开发大势所趋,抽出一个parent父工程,子模块基础模块(包含一些公用的实体类和工具类等),以及其他子模块(Module A. Module B -).Mo ...
- RLException: XXX is neither a launch file in package XXX nor is XXX a launch file name问题解决
RLException: XXX is neither a launch file in package XXX nor is XXX a launch file name问题解决 参考文章: (1) ...
- Package XXX is not configured yet
今天在用dpkg命令安装deb二进制包的时候出现了Package XXX is not configured yet的报错,百度了一下,有如下方法: sudo mv /var/lib/dpkg/inf ...
- Delphi 10.3 安装TM Scripter控件包出现关于提示can‘t load package ‘xxx.bpl.‘ 错误问题的简单解决方法
最近安装TM Scripter控件包,编译成功后,出现以下错误:can't load package 'xxx.bpl.' 解决方法,将以上提示的路径加入Delphi环境变量中,如下图: 以下是盒子网 ...
- go语言导入自定义包出现: package xxx is not in GOROOT (/xxx/xxx) 的解决方案
go语言导入自定义包出现: package xxx is not in GOROOT (/xxx/xxx) 的解决方案 1.问题 写了个自定义的包 calc.go,在路径 $GOPATH/projec ...
最新文章
- 【Xamarin开发 Android 系列 4】 Android 基础知识
- JVM - 解读GC中的 Safe Point Safe Region
- linux之dos2unix命令解决vi打开文件行尾巴显示^M
- 关于easyui的一些小知识点(1)
- 易语言添加ctrl c键,易语言操作快捷键汇总
- 【.NET】SqlDateTime 溢出。必须介于 1/1/1753 12:00:00 AM 和 12/31/9999 11:59:59 PM之间
- tomcat日志输出控制
- 网吧用服务器做虚拟化,刀片、无盘、集群、虚拟化,给你一个选择的理由(上)...
- 防病毒服务器维护记录表,机房巡检记录表.doc
- 股指期货首次和二次开户条件
- Vuex 的简单模拟、了解Vuex
- 【Auto.js教程】Auto.js入门及第一个示例程序
- WIN10系统 插上耳机没声音,解决方案
- 家长头疼的调皮男孩应该怎么管教
- 7 款优秀 Markdown 编辑工具推荐
- Linux下文件备份和同步的工具软件
- centos7 设置外部访问
- 新手期货开户的时候需要准备什么呢?
- 移动硬盘识别为本地硬盘_如果仅在硬盘已经旋转时才能识别硬盘,该怎么办?
- 一文囊括Ceph所有利器(工具)
热门文章
- UNREFERENCED_PARAMETER的作用 (unreferenced formal parameter 警告)
- 戴尔服务器远程访问管理卡iDRAC 7详解
- 两篇文章说异常和中断之二
- TCP/IP详解--第六章
- 数据包头分析---网络字节序与主机字节序
- matlab 代码开头,诸位大神请帮我讲解一下每个程序开头这些行的意思
- centos设置java环境变量,CentOS设置环境变量
- android 电源管理 关闭屏幕,Android之PowerManager电源管理
- 自动更新AndroidManifest版本号
- 乌班图linux分辨率不能调,ubuntu不能设置高分辨率问题的解决方法,