在Mac OS X Yosemite中完全卸载gcc? [英] Uninstalling gcc completely in Mac OS X Yosemite?

查看:4127
本文介绍了在Mac OS X Yosemite中完全卸载gcc?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



目前状态:

 ➜〜gcc -v 
使用内置规格。
COLLECT_GCC = gcc
COLLECT_LTO_WRAPPER = / usr / local / libexec / gcc / x86_64-apple-darwin14.0.0 /5.0.0/lto-wrapper
目标:x86_64-apple-darwin14.0.0
配置:../gcc-5-20141005/configure --enable languages = c ++,fortran
线程模型:posix
gcc版本5.0.0 20141005(实验)(GCC)

〜which gcc
/ usr / local / bin / gcc

我有xcode安装,我完全删除,也试图卸载使用brew。我想我有两个不同的版本安装一个使用brew和其他直接从hpc.sourceforge.net。

解决方案

由于您在中有 gcc / usr / local ,它不是您的操作系统的一部分。最干净 - 但强力的方式是完全删除 / usr / local ,然后重新安装你想要的东西。参见此处



/ usr / local 是不是来自OSX ,但是被诸如Homebrew的工具使用。如果你删除它,你会失去你用Homebrew安装的所有东西,包括Homebrew本身,但你可以重新安装它。你也会失去安装自己的其他工具。根据你在那里有多少,它可能是一个很快或很长的过程。



如果你不想这样做,你必须咨询源它提供了你的gcc。或者您可以 / usr / local / bin 下的 rm gcc及其相关二进制文件c> / usr / local / libexec / gcc 。这不会损害您的操作系统,但它可能会留下你的不必要的文件乱丢您的 / usr / local 我强烈建议您这么做,除非您知道自己在做什么


I am trying to uninstall gcc completely from my mac but unable to do so.

Current status :

  ➜  ~  gcc -v
  Using built-in specs. 
  COLLECT_GCC=gcc
  COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin14.0.0 /5.0.0/lto-wrapper
  Target: x86_64-apple-darwin14.0.0
  Configured with: ../gcc-5-20141005/configure --enable languages=c++,fortran
  Thread model: posix
  gcc version 5.0.0 20141005 (experimental) (GCC)

~  which gcc
  /usr/local/bin/gcc

I had xcode installed and I removed that completely and also I tried to uninstall using brew. I think I had two different versions installed one using brew and other directly from hpc.sourceforge.net .

解决方案

Since you have your gcc in /usr/local, it is not part of your operating system. The cleanest - but brute force - way is to delete /usr/local completely, and then reinstall the things you want to have there. See also here.

/usr/local is a directory that doesn't come from OSX, but is used by tools like Homebrew. If you delete it, you will lose everything you installed with Homebrew, including Homebrew itself, but you can reinstall it afterwards. You will also lose other tools that install themselves in there. Depending on how much you have there, it may be a quick or a very long procedure.

If you don't want to do this, you have to consult the source that provided you with your gcc. Or you could just rm gcc and its related binaries under /usr/local/bin and everything under /usr/local/libexec/gcc. This will not harm your OS, but it will probably leave you behind with unnecessary files littering your /usr/local. I strongly advice against doing this unless you know what you're doing.

这篇关于在Mac OS X Yosemite中完全卸载gcc?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆