如果已安装则卸载载安装就好了
#卸载net-tools yum remove net-tools #安装net-tools yum install net-tools执行过程效果:
[root@localhost ~]# yum remove net-tools 已加载插件:fastestmirror 正在解决依赖关系 --> 正在检查事务 ---> 软件包 net-tools.x86_64.0.2.0-0.25.20131004git.el7 将被 删除 --> 解决依赖关系完成 依赖关系解决 ==================================================================================== Package 架构 版本 源 大小 ==================================================================================== 正在删除: net-tools x86_64 2.0-0.25.20131004git.el7 @/ 917 k 事务概要 ==================================================================================== 移除 1 软件包 安装大小:917 k 是否继续?[y/N]:y Downloading packages: Running transaction check Running transaction test Transaction test succeeded Running transaction 正在删除 : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1 警告:文件 /sbin/ifconfig: 移除失败: 没有那个文件或目录 验证中 : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1 删除: net-tools.x86_64 0:2.0-0.25.20131004git.el7 完毕! ====================================================================================== [root@localhost ~]# yum install net-tools 已加载插件:fastestmirror Loading mirror speeds from cached hostfile * base: mirrors.163.com * extras: mirrors.163.com * updates: mirrors.aliyun.com 正在解决依赖关系 --> 正在检查事务 ---> 软件包 net-tools.x86_64.0.2.0-0.25.20131004git.el7 将被 安装 --> 解决依赖关系完成 依赖关系解决 ==================================================================================== Package 架构 版本 源 大小 ==================================================================================== 正在安装: net-tools x86_64 2.0-0.25.20131004git.el7 base 306 k 事务概要 ==================================================================================== 安装 1 软件包 总下载量:306 k 安装大小:917 k Is this ok [y/d/N]: y Downloading packages: net-tools-2.0-0.25.20131004git.el7.x86_64.rpm | 306 kB 00:00:00 Running transaction check Running transaction test Transaction test succeeded Running transaction 正在安装 : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1 验证中 : net-tools-2.0-0.25.20131004git.el7.x86_64 1/1 已安装: net-tools.x86_64 0:2.0-0.25.20131004git.el7 完毕! =================================================================================== [root@localhost ~]# ifconfig ens33: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500 inet 192.168.1.10 netmask 255.255.255.0 broadcast 192.168.1.255 inet6 fe70::20c:29ee:fe65:b6f2 prefixlen 64 scopeid 0x20<link> ether 00:0c:30:65:a4:e2 txqueuelen 1000 (Ethernet) RX packets 9427 bytes 10752810 (10.2 MiB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 2101 bytes 186230 (181.8 KiB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 0 bytes 0 (0.0 B) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 0 bytes 0 (0.0 B) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 [root@localhost ~]#
