[root@xiaolyu77 ~]# rpm -qa
error: no dbpath has been set
error: cannot open Packages database in /%{_dbpath}
error: no dbpath has been set
error: cannot open Packages database in /%{_dbpath}
[root@xiaolyu76 rpm]# scp macros root@xiaolyu77:/usr/lib/rpm/
4. 执行一下updatedb命令[root@xiaolyu77 ~]# updatedb
5. reboot重启一下:ok!来检验一下:[root@xiaolyu77 rpm]# rpm -qa | grep rpm
完美的解决了问题,是为记录一下!