首页 > 解决方案 > centos 7上未安装httpbeat包

问题描述

我从以下位置下载了文件: https ://github.com/christiangalsterer/httpbeat/releases httpbeat-4.0.0-x86_64.rpm

并尝试通过以下方式安装它: sudo yum localinstall httpbeat-4.0.0-x86_64.rpm

但我没有看到它是通过命令安装的:

[k@f httpbeat]$ rpm -ql httpbeat-4.0.0-x86_64.rpm
package httpbeat-4.0.0-x86_64.rpm is not installed

[k@f httpbeat]$ sudo yum install httpbeat-4.0.0-x86_64.rpm
Loaded plugins: fastestmirror
Examining httpbeat-4.0.0-x86_64.rpm: httpbeat-5.2.1_SNAPSHOT-1.x86_64
httpbeat-4.0.0-x86_64.rpm: does not update installed package.
Error: Nothing to do

[k@f httpbeat]$ rpm -qi httpbeat-4.0.0-x86_64.rpm
package httpbeat-4.0.0-x86_64.rpm is not installed


[k@f httpbeat]$ sudo rpm -i httpbeat-4.0.0-x86_64.rpm
        package httpbeat-5.2.1_SNAPSHOT-1.x86_64 is already installed

[k@f httpbeat]$ rpm -qi httpbeat-4.0.0-x86_64.rpm
package httpbeat-4.0.0-x86_64.rpm is not installed


[k@f httpbeat]$ sudo yum remove httpbeat-4.0.0-x86_64.rpm
Loaded plugins: fastestmirror
No Match for argument: httpbeat-4.0.0-x86_64.rpm
No Packages marked for removal

[k@f httpbeat]$ sudo yum install httpbeat-4.0.0-x86_64.rpm
Loaded plugins: fastestmirror
Examining httpbeat-4.0.0-x86_64.rpm: httpbeat-5.2.1_SNAPSHOT-1.x86_64
httpbeat-4.0.0-x86_64.rpm: does not update installed package.
Error: Nothing to do

有时它告诉我它是already installed,有时它不是 - 这是真的,我怎样才能成功安装它?

编辑

[k@f httpbeat]$ yum remove httpbeat-4.0.0-x86_64
Loaded plugins: fastestmirror
You need to be root to perform this command.
[k@f httpbeat]$ sudo yum remove httpbeat-4.0.0-x86_64
Loaded plugins: fastestmirror
No Match for argument: httpbeat-4.0.0-x86_64
No Packages marked for removal

rpm -ql httpbeat-4.0.0-x86_64
package httpbeat-4.0.0-x86_64 is not installed

标签: centoscentos7rpmyum

解决方案


这个命令是错误的:

$ rpm -ql httpbeat-4.0.0-x86_64.rpm

rpm命令在数据库中查找包名,它没有.rpm扩展名。相反,在使用后执行此操作yum localinstall

$ rpm -ql httpbeat-4.0.0-x86_64

对于yum remove. 安装后使用rpmdb

$ yum remove httpbeat-4.0.0-x86_64

推荐阅读