无法在 centos 6 中运行 lspci?

无法在 centos 6 中运行 lspci?

尝试运行 lspci 但是它似乎不起作用?

[Ramy@localhost ~]$ sudo yum install pciutils
Loaded plugins: fastestmirror, refresh-packagekit
Loading mirror speeds from cached hostfile
 * base: mirrors.lga7.us.voxel.net
 * epel: epel.mirror.constant.com
 * extras: mirror.metrocast.net
 * rpmforge: mirror.us.leaseweb.net
 * updates: centos.mirror.constant.com
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package pciutils.i686 0:3.1.4-11.el6 set to be updated
 Dependency: pciutils-libs = 3.1.4-11.el6 for package: pciutils-3.1.4-11.el6.i686
--> Running transaction check
---> Package pciutils-libs.i686 0:3.1.4-11.el6 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================
 Package                Arch          Version               Repository     Size
================================================================================
Updating:
 pciutils               i686          3.1.4-11.el6          base           83 k
Updating for dependencies:
 pciutils-libs          i686          3.1.4-11.el6          base           34 k

Transaction Summary
================================================================================
Install       0 Package(s)
Upgrade       2 Package(s)

Total download size: 117 k
Is this ok [y/N]: y
Downloading Packages:
(1/2): pciutils-3.1.4-11.el6.i686.rpm                    |  83 kB     00:00     
(2/2): pciutils-libs-3.1.4-11.el6.i686.rpm               |  34 kB     00:00     
--------------------------------------------------------------------------------
Total                                            98 kB/s | 117 kB     00:01     
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Updating       : pciutils-libs-3.1.4-11.el6.i686                          1/4 
  Updating       : pciutils-3.1.4-11.el6.i686                               2/4 
  Cleanup        : pciutils-3.1.4-9.el6.i686                                3/4 
  Cleanup        : pciutils-libs-3.1.4-9.el6.i686                           4/4 

Updated:
  pciutils.i686 0:3.1.4-11.el6                                                  

Dependency Updated:
  pciutils-libs.i686 0:3.1.4-11.el6                                             

 Complete!
[Ramy@localhost ~]$ lspci | grep VGA
bash: lspci: command not found

答案1

“未找到命令”与“它似乎不起作用”有很大不同。

要么 lspci 安装到了不在您的路径中的位置,要么您使用了需要 rehash 来更新其目录缓存的 shell。

请注意,您确实尝试以普通用户身份运行它。因此 /sbin、/usr/sbin 和 /usr/local/sbin 可能不在您的路径中。

相关内容