Ubuntu 一直要求依赖的错误
今天笔者在windows上装linux双系统,选用的ubuntu,因为第> 一次用,所以出现了这个问题。
如题,安装个gcc一直要求我要装依赖,如图

接下来我又开始一个个安装那些依赖,比如 sudo apt-get install libc6-dev,然后又报依赖出错。
解决方法
这个问题出在了源的配置上,因为我装的源配置的系统版本代号出问题了。
查询系统版本代号
lsb_release -a
例:
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 20.04.1 LTS
Release: 20.04
Codename: focal
这里的focal就是版本代号,记下或复制
看源列表
打开https://wiki.ubuntu.org.cn/%E6%BA%90%E5%88%97%E8%A1%A8
复制上面的模板
例:deb http://cn.archive.ubuntu.com/ubuntu/ willy main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ willy-security main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ willy-updates main restricted universe multiverse
deb http://cn.archive.ubuntu.com/ubuntu/ willy-backports main restricted universe multiverse
##測試版源
deb http://cn.archive.ubuntu.com/ubuntu/ willy-proposed main restricted universe multiverse
#源碼
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-security main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-updates main restricted universe multiverse
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-backports main restricted universe multiverse
##測試版源
deb-src http://cn.archive.ubuntu.com/ubuntu/ willy-proposed main restricted universe multiverse
接下来把里面的willy全部换成自己的版号,比如把全部willy换成focal
调用命令打开配置包源的文件
推荐先备份:sudo cp /etc/apt/sources.list /etc/apt/sources.list_backup
调用命令打开配置包源的文件:
sudo vim /etc/apt/sources.list
在vim操作文件
- 按ggVG全选文本
- 按键盘上的del全部删除
- 按i进入编辑模式
- 把上面改过的模板复制进去
- 按键盘上的ESC
- 输入:wq然后enter
输入以下指令
sudo apt-get update
sudo apt-get upgrade
Ubuntu 一直要求依赖的错误的更多相关文章
- ubuntu 下安装 VIM 依赖vim-common错误
ubuntu 下安装 VIM 依赖vim-common错误 sudo apt-get remove vim-common 先把上面的错误依赖删除 sudo apt-get install vim ...
- Ubuntu 汉化时ubuntu software database is broken错误解决
关于Ubuntu 汉化时的错误解决:按照网上的方法没有解决 最后 删掉thunderbird mail .这个软件,顺利解决!! 错误:thunderbird-locale-en: Depends: ...
- Ubuntu 使用apt-get时提示错误:无法获得锁 /var/lib/dpkg/lock
推荐博客:http://blog.sina.com.cn/s/blog_5c1450a8010188ju.html Ubuntu 使用apt-get时提示错误:无法获得锁 /var/lib/dpkg/ ...
- 在ubuntu更新时,出现错误E: Some index files failed to download, they have been ignored, or old ones used inst
原文:https://blog.csdn.net/tian_ciomp/article/details/51339635 在ubuntu更新时,出现错误E: Some index files fail ...
- Ubuntu系统---开机总会显示错误报告处理
Ubuntu系统---开机总会显示错误报告处理 使用ubuntu16.04,开机总会显示错误报告,略烦人,查找方法关闭.一.临时关闭sudo service apport stop(重启后失效) 二. ...
- tomcat - 解决 org.bouncycastle.asn1.ASN1Boolean 非法循环依赖的错误
背景 记录遇到一次奇怪的错误,在发布war包到Tomcat的时候,出现了org.bouncycastle.asn1.ASN1Boolean非法循环依赖的错误. INFO: Deploying web ...
- Ubuntu 14.04—无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系 解决办法
在Ubuntu中使用sudo apt-get install安装是有时候会出现: 无法修正错误,因为您要求某些软件包保持现状,就是它们破坏了软件包间的依赖关系 解决办法 这样的错误,这是因为更新源 ...
- ubuntu系统安装nginx出现的错误(依赖环境没有安装完)
报错信息: error: the HTTP image filter module requires the GD library. 编译参数:(或源安装) ./configure --prefix= ...
- ubuntu安装greenplum依赖包
ubuntu安装greenplum的过程中有两个比较难找的包,特地写出来给大家分享一下: 错误提示1:configure: error: header file <ldap.h> is r ...
随机推荐
- CSS常用语法缩写
使用缩写可以帮助减少你CSS文件的大小,更加容易阅读.CSS常用语法缩写的主要规则如下: 颜色 16进制的色彩值,如果每两位的值相同,可以缩写一半,例如:#000000可以缩写为#000;#33669 ...
- Making Games with Python & Pygame 中文翻译
Making Games with Python & Pygame 用Pygame做游戏 第1章-安装python和pygame 原文作者:Al Sweigart 翻译:bigbigli/李超 ...
- ARC109F - 1D Kingdom Builder
一行格子,其中小于\(0\)的格子为白色,大于\(n\)的格子为黑色,中间的格子颜色由题目给出. 有一些格子需要被标记.标记按照以下规则进行:选择一个颜色\(c\),找到一个未标记的 旁边有标记点的 ...
- spring入门学习
开发步骤: 1.导入Spring开发的基本坐标 2.编写接口和实现类 3.创建Spring核心配置文件 4.在Spring核心配置文件中配置实现类 5.使用Spring的API获得Bean实例Bean ...
- Kubernetes【K8S】(一):Kubernetes组件
什么是Kubernetes Kubernetes 是一个可移植的.可扩展的开源平台,用于管理容器化的工作负载和服务,可促进声明式配置和自动化.Kubernetes拥有一个庞大且快速增长的生态系统. ...
- Java中构造代码块的使用
例子1 public class Client { { System.out.println("执行构造代码块1"); } { System.out.println("执 ...
- Open_basedir绕过
Open_basedir绕过 一.基础知识 open_basedir是php.ini中的一个配置选项,它可将用户访问文件的活动范围限制在指定的区域, 假设open_basedir=/home/wwwr ...
- 响应式网站设计---Bootstrap
响应式布局可以帮助我们实现网站布局随屏幕大小自动调整的需求,实现不同屏幕分辨率的终端上浏览网页的不同展示方式,使得网页在PC端和手机端均可以完美的展现其内容,具有自适应性. 使用基于Bootstrap ...
- 很多人不知道的Python 炫技操作:条件语句的写法
有的人说 Python 是一门 入门容易,但是精通难的语言,这一点我非常赞同. Python 语言里有许多(而且是越来越多)的高级特性,是 Python 发烧友们非常喜欢的.在这些人的眼里,能够写出那 ...
- Python自动化办公第三方库xlwt
Python向excel表格写入内容,首先安装第三方库: pip3 install xlwt 代码实例(结合xlrd): #!usr/bin/env python3 #!-*-coding=utf-8 ...