(1)查看安装的gcc版本
[y@localhost Desktop]
$ rpm -q gcc
gcc-4.4.7-23.el6.x86_64
1
2
3
(2)执行卸载命令 rpm -e
[y@localhost Desktop]
$ rpm -e gcc-4.4.7-23.el6.x86_64
error: Failed dependencies:
gcc = 4.4.7-23.el6 is needed by (installed) gcc-c++-4.4.7-23.el6.x86_64
gcc = 4.4.4 is needed by (installed) libtool-2.2.6-15.5.el6.x86_64
1
2
3
4
5
提示gcc-4.4.7-23.el6.x86_64被2个软件依赖,卸载失败,则先卸载被依赖的软件包
sudo rpm -e gcc-c++-4.4.7-23.el6.x86_64
sudo rpm -e libtool-2.2.6-15.5.el6.x86_64
1
2
(4)再执行sudo rpm -e gcc-4.4.7-23.el6.x86_64进行卸载
sudo rpm -e gcc-4.4.7-23.el6.x86_64
1
卸载成功
(5) 验证,输入gcc -v
[y@localhost Desktop]
$ gcc -v
bash: gcc: command not found
1
2
3
提示command not found,说明的确卸载成功了。
————————————————
版权声明:本文为CSDN博主「yzpyzp」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/yzpbright/java/article/details/81568830