【问题标题】:yum remove cmake failedyum 删除 cmake 失败
【发布时间】:2019-11-14 18:46:00
【问题描述】:

我想更新cmake,旧版本是2.8。但是什么时候卸载旧版本cmake就不行了。

[chaos@localhost ~]$ cmake --version
cmake version 2.8.10.2
[lichao@localhost ~]$ yum info cmake
Available Packages
Name        : cmake
Arch        : x86_64
Version     : 2.8.12.2
Release     : 2.el7
Size        : 7.1 M
Repo        : base
Summary     : Cross-platform make system
URL         : http://www.cmake.org
License     : BSD and MIT and zlib
Description : CMake is used to control the software compilation process using simple
            : platform and compiler independent configuration files. CMake generates
            : native makefiles and workspaces that can be used in the compiler
            : environment of your choice. CMake is quite sophisticated: it is possible
            : to support complex environments requiring system configuration, preprocessor
            : generation, code generation, and template instantiation.
[chaos@localhost ~]$ sudo yum remove cmake -y
[sudo] password for lichao: 
No Match for argument: cmake
No Packages marked for removal

【问题讨论】:

    标签: cmake centos yum


    【解决方案1】:

    您使用的cmake 是手动安装的,而不是使用yum

    yum info 显示您的存储库(基础)中可用的包的信息,它没有安装,否则会说

    Repo : installed
    

    所以由于没有使用yum 安装cmake,因此您无法使用yum 将其删除。

    注意:您还可以看到版本号不同...

    【讨论】:

    • 感谢您的回复,但我确信我应该安装 cmake,因为当我输入 [chaos@localhost ~]$ cmake --version cmake version 2.8.10.2
    • 是的,cmake 已安装,但可能有人自己编译了 cmake 并运行了make install。没有人跑yum install cmake
    【解决方案2】:

    如果您想更新它之前不需要删除包。可以直接执行更新命令:

    yum update cmake
    

    【讨论】:

      猜你喜欢
      • 2017-01-30
      • 2014-03-01
      • 1970-01-01
      • 2016-04-16
      • 2013-12-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多