Uninstalling gcc

蓝咒 提交于 2020-12-06 06:53:52

问题


I want to uninstall my gcc by terminal. When I type

gcc --version

The output is

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.4) 5.4.0 20160609
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Could anyone help me? How can I install the last version of gcc after that?


回答1:


Use the following command (Replace <version> with the appropriate version):

sudo apt-get --purge remove gcc-<version>

You can install a specific version of a program using apt, you can use the following command. (Replace <version> with the appropriate version)

sudo apt-get install gcc=<version>

Alternatively, you can use Synaptic Package Manager.

sudo apt-get update
sudo apt-get install synaptic

Note that, you might need GCC for some programs. If you face any driver issues while installing programs / drivers you can install the latest GCC by using:

sudo apt-get install gcc


来源:https://stackoverflow.com/questions/46687351/uninstalling-gcc

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!