Ubuntu点滴--apt-get update和upgrade的作用
update
update is used to resynchronize the package index files from their
sources. The indexes of available packages are fetched from the
location(s) specified in /etc/apt/sources.list. For example, when
using a Debian archive, this command retrieves and scans the
Packages.gz files, so that information about new and updated
packages is available. An update should always be performed before
an upgrade or dist-upgrade. Please be aware that the overall
progress meter will be incorrect as the size of the package files
cannot be known in advance. upgrade
upgrade is used to install the newest versions of all packages
currently installed on the system from the sources enumerated in
/etc/apt/sources.list. Packages currently installed with new
versions available are retrieved and upgraded; under no
circumstances are currently installed packages removed, or packages
not already installed retrieved and installed. New versions of
currently installed packages that cannot be upgraded without
changing the install status of another package will be left at
their current version. An update must be performed first so that
apt-get knows that new versions of packages are available. dist-upgrade
dist-upgrade in addition to performing the function of upgrade,
also intelligently handles changing dependencies with new versions
of packages; apt-get has a "smart" conflict resolution system, and
it will attempt to upgrade the most important packages at the
expense of less important ones if necessary. The dist-upgrade
command may therefore remove some packages. The
/etc/apt/sources.list file contains a list of locations from which
to retrieve desired package files. See also apt_preferences(5) for
a mechanism for overriding the general settings for individual
packages. 上面的内容是从apt-get的man文档中摘录出来的。上面表达的意思就是,update的作用是从/etc/apt/source.list文件中定义的源中去同步包的索引文件,即运行这个命令其实并没有更新软件,而是相当于windows下面的检查更新,获取的是软件的状态。 而upgrade则是更据update命令同步好了的包的索引文件,去真正地更新软件。 而dist-upgrade则是更聪明的upgrade,man文档中说它以更聪明的方式来解决更新过程中出现的软件依赖问题,它也是从/etc/apt/source.list文件中获得地址,然后从这些地址中检索需要更新的包。 最后,需要注意的一点是,每回更新之前,我们需要先运行update,然后才能运行upgrade和dist-upgrade,因为相当于update命令获取了包的一些信息,比如大小和版本号,然后再来运行upgrade去下载包,如果没有获取包的信息,那么upgrade就是无效的啦!
Ubuntu点滴--apt-get update和upgrade的作用的更多相关文章
- ubuntu sudo update与upgrade的作用及区别
ubuntu sudo update与upgrade的作用及区别 入门linux的同志,刚开始最迫切想知道的,大概一个是中文输入法,另一个就是怎么安装软件.本文主要讲一下LINUX安装软件方面的特点. ...
- ubuntu 手动更新源 以及使用sudo update与upgrade的作用及区别
一.今天更新一下我的ubuntu系统,用了几个源发现不怎么好用 上网查了一下发现有说阿里云的源挺好用 然后我试了一下 下载速度还挺快,下面分享一下怎么手动添加源列表 1.最好先做一下备份 sudo c ...
- Linux中的update和upgrade的作用
update 是同步 /etc/apt/sources.list 和 /etc/apt/sources.list.d 中列出的源的索引,这样才能获取到最新的软件包.update是下载源里面的metad ...
- Linux - Ubuntu下执行apt-get update报错:Some index files failed to download. They have been ignored, or old ones used instead.
报错命令 root@ubuntu:/etc/apt# apt-get update Err: http://mirrors.aliyun.com/ubuntu trusty InRelease Cou ...
- Ubuntu用sudo apt-get update出错:E: Problem executing scripts APT::Update::Post-Invoke-Success
Ubuntu用sudo apt-get update出错: E: Problem executing scripts APT::Update::Post-Invoke-Success 'if /u ...
- 关于Ubuntu下apt的一些用法及和yum的比较
Fedora和Red Hat有yum安装软件,Ubuntu有apt工具. apt简单的来说,就是给Ubuntu安装软件的一种命令方式. 一.apt的相关文件 /etc/apt/sources.list ...
- 在Ubuntu下运行 apt-get update命令后出现错误:
在Ubuntu下运行 apt-get update命令后出现错误: The package lists or status file could not be parsed or opened sud ...
- Fully Update And Upgrade Offline Debian-based Systems
Let us say, you have a system (Windows or Linux) with high-speed Internet connection at work and a D ...
- 修改Ubuntu默认apt下载源
修改Ubuntu默认apt下载源 默认下载源很慢,改成阿里的下载速度超快 sudo vim /etc/apt/sources.list 将文件内容替换成 deb http://mirrors.aliy ...
随机推荐
- NLP学习资源
Journals ACM Transactions on Information Systems (TOIS) 影响因子 5.059(2006) IEEE Transactions on Knowl ...
- UILabel使用技巧
UILabel的各种属性与方法的使用(转) #import "LabelTestViewController.h" @implementation LabelTestViewCon ...
- 用java程序调用ffmpeg执行视频文件格式转换flv
用java小例题说明更直观:(可以直接编译运行)环境我在windows平台下测试的...需要在e:/下有ffmpeg.exe;mencoder.exe;drv43260.dll;pncrt.dll共4 ...
- 查看MySQL的错误日志的方法
我们经常在运行MySQL时会出一些错误,也经常被这些错误搞得晕头转向.当然解决这些问题的首要任务是找到日志信息. MySQL的错误信息是在data目录下的,且文件名为<hostname>. ...
- codeblocks安装后无法编译
codeblocks安装后无法编译: 解决办法: 1.下载自带编译器的codeblock安装包. 2.安装完后.修改配置 (1)打开软件,选择setting->Compiler (2)在编译器设 ...
- [SQL] 不知道是什么存储过程
CREATE PROCEDURE dt_DXS_STAFF_ACTIVE @STAFFSTATUS INT, @STAFFNUM INT, @STARTNO INT, @@TOTALCOUNT INT ...
- Hibernate注解:一对多外键关联
情形:两个表,cms_mode是主表,cms_model_field是子表,cms_model_field的model_id字段关联到cms_model的主键. # # Source for tabl ...
- NYOJ-228 士兵杀敌5
士兵杀敌(五) 时间限制:2000 ms | 内存限制:65535 KB 难度:5 描述 南将军麾下有百万精兵,现已知共有M个士兵,编号为0~M,每次有任务的时候,总会有一批编号连在一起人请战(编 ...
- Eclipse不能进入断点
如题:Eclipse不能进入断点,可能是项目没有build,如果是maven项目,clean,在maven install就可以了
- ASP.NET fails to detect Internet Explorer 10
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9"> http://www.han ...