linux安装软件时提时缺包或缺文件,这时该怎么办?

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了linux安装软件时提时缺包或缺文件,这时该怎么办?相关的知识,希望对你有一定的参考价值。

linux安装软件时提示缺包或缺文件,自己用不知软件名或包名,这时该怎么办?下面马上告诉你:

用yum命令,前提是搭建好YUM源。

固定命令格式:

yum whatprovides filename #<====filename是文件名。就写上你要查的包或文件即可。

例子:

[[email protected] ~]# yum whatprovides fuser
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • epel: mirrors.aliyun.com
  • extras: mirrors.cn99.com
  • updates: mirrors.cn99.com
    base/7/x86_64/filelists_db | 6.9 MB 00:00:02
    epel/x86_64/filelists | 10 MB 00:00:03
    extras/7/x86_64/filelists_db | 588 kB 00:00:01
    updates/7/x86_64/filelists_db | 2.3 MB 00:00:02
    psmisc-22.20-15.el7.x86_64 : Utilities for managing processes on your system
    Repo : base
    Matched from:
    Filename : /usr/sbin/fuser

[[email protected] ~]# fuser
-bash: fuser: command not found
[[email protected] ~]# yum install psmisc -y
Loaded plugins: fastestmirror
Loading mirror speeds from cached hostfile

  • base: mirrors.aliyun.com
  • epel: mirrors.aliyun.com
  • extras: mirrors.cn99.com
  • updates: mirrors.cn99.com
    Resolving Dependencies
    --> Running transaction check
    ---> Package psmisc.x86_64 0:22.20-15.el7 will be installed
    --> Finished Dependency Resolution

Dependencies Resolved

=========================================================================================================================================
Package Arch Version Repository Size

Installing:
psmisc x86_64 22.20-15.el7 base 141 k

Transaction Summary

Install 1 Package

Total download size: 141 k
Installed size: 475 k
Downloading packages:
psmisc-22.20-15.el7.x86_64.rpm | 141 kB 00:00:00
Running transaction check
Running transaction test
Transaction test succeeded
Running transaction
Installing : psmisc-22.20-15.el7.x86_64 1/1
Verifying : psmisc-22.20-15.el7.x86_64 1/1

Installed:
psmisc.x86_64 0:22.20-15.el7

Complete!

以上是关于linux安装软件时提时缺包或缺文件,这时该怎么办?的主要内容,如果未能解决你的问题,请参考以下文章

linux中把一个包解压(tar)安装成功后那些软件安装在啥位置,那个解压包时产生的文件夹可以删除吗?

android怎么实现在线查看pdf文档

基于android如何读取pdf文件

在安装zli1g-dev时出现依赖错误,谁知道怎么解决

Linux中怎么安装文件

linux怎么知道程序安装在哪个文件夹