DNF(一.YUM已死,DNF代之)

  Yum还没学好呢,突然听到已经要被抛弃了.恐慌至极..

  在最新版的Fedora 22 抛弃了Yum包管理器,取而代之的是DNF..

  那么搜搜 Fedora 22 Release Note..

  官方给出了解释和一些改变.

  在最新的Fedora 22 试了下 基本的安装更新用法也没怎么变

  以前安装 yum install httpd ,变成 dnf install httpd

以下是官方文档,有时间慢慢翻译..

3.6.1. Yum replaced by DNF

The yum package manager has been replaced in Fedora 22 by its successor, dnf. The yum fork has been available in Fedora for testing since Fedora 18, and is now the default command line package manager.

Most dnf commands use directives that are familiar to yum users, and it uses the same RPM package repositories. Behind the scenes, dnf uses an improved dependency solver, hawkey, along with librepo for repository operations and libcomps for package groups.

The /usr/bin/yum command will redirect to /usr/bin/dnf and print a warning about the redirection. The legacy yum package manager can be manually installed; the legacy command line utility has been renamed to yum-deprecated.

Read more about using dnf! Consult the upstream documentation athttp://dnf.readthedocs.org/en/latest/index.html. Extra plugins are documented at https://rpm-software-management.github.io/dnf-plugins-extras/index.htm

The behavior of dnf differs from yum in some areas:

3.6.1.1. Updates that don‘t work are skipped

If a portion of a transaction is not viable, dnf will automatically exclude it and transparently continue with the portions that will work. For example, if a package has unmet dependencies during a dnf update action, that package will not be updated, but others will. This is similar to yum‘s --skip-broken directive, but evaluates the impact of the problem against the entire transaction. Because this is the default behavior, there is no --skip-broken switch for dnf.

To reveal details about a problematic package direction, you can use the --best option. dnf update --best will force dnf to resolve the transaction using the latest versions of involved packages, and report any problems instead of skipping them. This is equivalent to yum‘s behavior without --skip-broken.

3.6.1.2. Repos that don‘t work are skipped

If a configured and enabled repository does not respond, dnf will skip it and continue the transaction with the available repos. This differs from yum, which would immediately stop if a repository was not available.

3.6.1.3. Update and Upgrade are the same

The commands dnf update and dnf upgrade are equivalent. This differs from yum, where yum upgrade would have the same effect as yum update --obsoletes, and take obsolete packages into account.

3.6.1.4. Dependencies are not upgraded on package installation

When installing a new package, previously installed dependencies will not be upgraded. Yum offered an option for this behavior, upgrade_requirements_on_install. To upgrade with dnf, use dnf update.

If dnf reports that dependencies on installed packages are unmet while installing a new package, update the dependent packages before trying again.

3.6.1.5. Clean on remove

When removing a package, dnf will automatically remove any dependent packages that were not explicitly installed by the user. If a package was independently installed, it won‘t be uninstalled this way. Only packages installed as dependencies are removed.

This behavior is configured by the clean_requirements_on_remove option in /etc/dnf/dnf.conf

3.6.1.6. Repo cache refresh schedule

By default, dnf will check for updates in configured repositories hourly, starting ten minutes after the system boots. The action is controlled by a systemd timer unit, /usr/lib/systemd/system/dnf-makecache.timer.

To adjust this, copy the timer file to /etc/systemd/system/dnf-makecache.timer and edit it.

Alternatively, setting the metadata_timer_sync in /etc/dnf/dnf.conf to a number of seconds configures the minimum number of seconds between makecache operations. If the timer has not expired, dnf makecache will exit immediately.

dnf will also honor the metadata_expire option set in individual repo configs, and refresh repo metadata at runtime if it is too old. This option is described in man yum.conf.

3.6.1.7. Repository Actions

The repository-packages directive can be used to search for or get info about packages in a specific repository, list installed packages from that repository, and more. This simplifies operations that would have required use of --excluderepo and --includerepo options with yum, and is especially useful for managing similar packages from different repositories.

3.6.1.8. Listing dependencies

To find out what package supplies a particular provide, use the dnf provides foo command. This replaces yum resolvedep foo.

To list the dependencies of a package, use dnf repoquery --requires foo. This replaces yum deplist foo.

3.6.1.9. dnf will remove kernels

kernel packages are not protected by dnf. Unlike with yum, you can remove all kernel packages, including the running package, if you direct it to. Be cautious with removing kernels, and specify the full version and release when removing them for best results.

3.6.1.10. Replacing packages

When a system requires the capabilities of a package you want to replace, use the --allowerasing option. For example, dnf --allowerasing mariadb will allow you to replace mysql with mariadb, without disrupting packages that require capabilities provided by both packages. This replaces yum shell and yum swap functionality.

3.6.1.11. DNF Langpacks Plug-in

DNF supports installing language packs using the dnf-langpacks plug-in, which is expected to work identically to the older yum-langpacks plug-in. See Section 4.3.3, “DNF Langpacks Plug-in” for details.

3.6.1.12. Support for disabled repositories

The Software tool and PackageKit now support searching for packages in disabled repositories.

If a user searches for a package using one of these applications and the package is found in a repository which includes the line enabled_metadata=1 in its definition, a dialog window will be displayed informing the user that the package has been found, but an additional repository must be enabled before it can be installed.

The same message can also inform the user about the reason why the repository is disabled by default.

This change allows Fedora remixes to ship pre-configured but disabled repositories for any reason - for example, if said repositories contain non-free software. Fedora itself does not have any such repositories pre-configured; therefore this feature will not be visible on a Fedora 22 installation unless you specifically configure one or more repositories with the enabled_metadata=1 statement.

时间: 2024-10-18 13:36:05

DNF(一.YUM已死,DNF代之)的相关文章

HoloLens之父:智能手机已死 未来人人都戴头盔

原文标题:HoloLens之父:智能手机已死 未来人人都戴头盔 在智能手机市场,无论是在硬件产品还是操作系统,微软遭遇了惨败,关闭业务被认为只是时间早晚的问题.微软已经投入巨资,研发增强现实技术(AR).据外媒最新消息,微软HoloLens的一名发明者日前表示,智能手机已经死亡,未来将是头盔的天下. 据美国科技新闻网站TheVerge报道,做出这一表态的微软技术高管是金普曼(Alex Kipman),被认为是HoloLens增强现实头盔以及游戏动感控制器Kinect的主要发明人. 在接受彭博社采

【003】【Java虚拟机——对象已死判定】

对象已死! 垃圾收集器在对堆进行回收前,首先要做的事情就是要确定这些对象之中哪些还"存活"着, 哪些已经"死去" (即不可能再被任何途径使用的对象). 1)  引用计数算法 给每个对象中添加一个引用计数器,每当有一个地方引用它时, 计数器值就加l : 当引用失效时,计数器值就减l :任何时刻计数器为0 的对象就是不可能再被使用的.引用计数算法( Reference Counting )的实现简单,判定效率也很高,在大部分情况下它都是一个不错的算法.Java 虚拟机里面没有选用

JVM的判断对象是否已死和四种垃圾回收算法总结

面试题一:判断对象是否已死 判断对象是否已死就是找出哪些对象是已经死掉的,以后不会再用到的,就像地上有废纸.饮料瓶和百元大钞,扫地前要先判断出地上废纸和饮料瓶是垃圾,百元大钞不是垃圾.判断对象是否已死有引用计数算法和可达性分析算法. 1.引用计数算法 给每一个对象添加一个引用计数器,每当有一个地方引用它时,计数器值加 1:每当有一个地方不再引用它时,计数器值减 1,这样只要计数器的值不为 0,就说明还有地方引用它,它就不是无用的对象.如下图,对象 2 有 1 个引用,它的引用计数器值为 1,对象

JVM——对象已“死”的判定

主要针对Java堆和方法区 1.判断对象是否已"死" Java堆中存放着几乎所有的对象实例,垃圾回收器在对堆进行回收之前,首先应该判断这些对象哪些还"存活",哪些已经"死亡". (1)引用计数法 A. 工作流程 给每个对象附加一个计数器,每当有一个地方引用此对象.计数器+1:每当有一个地方不再引用此对象,计数器-1:在任意时刻,只要对象引用计数器值为0,任务此对象已经"死亡".(没有"死亡"的对象一定不会被

centos6.5安装MYSQL“mysqld已死,但是subsys被锁”的解决方案

今天安装好了centos 6.5  32位系统,远程安装好了MySQL,进入mysql后,有事忘了退出来,当我想起来之后,远程已经断开连接,重新连接ssh,登录MySQL,输入密码提示错误,检查服务:service mysqld status [[email protected] ~]# service mysqld status mysqld 已死,但是 subsys 被锁 [[email protected] ~]# 然后查询下资料,按照以下步骤: [[email protected] ~]

ServiceMix--JBI已死-Camel代替

本文目的: 一开始接触ESB的时候,对mule,servicemix等进行选型,当时考虑到sm对jbi有支持,mule的社区版本砍掉的功能较多等原因, 选择了sm.在进行sm用做web service代理时,看到网上只有一个sm3.0时代的文章: 名称:使?用?S?e?r?v?i?c?e?m?i?x?(?E?S?B?)?发?布?一?个?外?部?的?W?e?b?S?e?r?v?i?c?e 地址:http://wenku.baidu.com/link?url=A9Ava_nYaGHDFBO0mAgy

为什么说传统电视已死?

前些日子,"互联网女皇"玛丽·米克尔(Mary Meeker)发布2014年年度互联网趋势报告,并且在这份报告中指出"重新定义遥控器"的概念.在玛丽·米克尔看来,随着互联网的应用和普及,未来互联网和智能终端设备的发展,无疑将促使多屏一体成为新的潮流和技术趋势,同时改写全新的互联网和新的商业生态. 除此之外,玛丽·米克尔还在这份报告中额外指出,智能电视将蚕食功能电视市场.并且改变互联网的屏幕,特别是以APP为方式的智能电视,未来将成家庭娱乐中心. 玛丽·米克尔的这种观

第三方推送已死

国内第三方推送的起源 2010 年左右,Android 手机在国内迅速发展,Google 的原生推送(C2DM,现在的 GCM)由于种种原因不能正常使用,当时的 Android 开发者使用各种办法来解决这个问题,其中就包括 Android 手机厂商开发出自己的推送方案. 对于大部分开发者来说,除了做一个 App,还要独立开发一套推送系统是件异常困难的事情.哪怕是用户数量很大的 App ,这也不是一件容易的事情.于是在 2011 年底,我产生了做独立第三方推送服务的想法,也就有了后来的极光推送.

谁说门户已死?从世界杯看新浪的四大优势

巴西世界杯即将尘埃落定,四大门户的世界杯报道大战也进入最后的"角逐"阶段.根据过去的案例分析,谁的资源整合能力强,谁就能成为世界杯报道的赢家.目前巴西世界杯赛程已接近尾声,这场门户之间的报道大战也将很快见分晓. 今天笔者先分析下新浪. 四大门户之中,新浪在重大事件报道方面应该是最有发言权的,不仅仅因为新浪在内容方面多年来的积累,更重要的是,新浪旗下有诸多产品资源和平台资源.从今年世界杯期间的表现来看,新浪在内容.移动.社交.营销四个方面都表现出明显的优势. 内容:老牌门户的积淀+微博新