我如何才能恢复默认的 gcc 编译器?

我如何才能恢复默认的 gcc 编译器?

我目前无法编译(“制作”)任何东西。一切都以以下内容结束:

as: unrecognized option '--64'

于是我寻找原因,发现

gcc -version

给了我这个:

gcc (GCC) 4.1.2 20060728 (prerelease) (TIGCC 4.1.2-pre9)
Copyright (C) 2006 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.

啊,是的,我确实在某个时候安装了 TIGCC(它用于为 TI 计算器交叉编译 C 程序)。我真的不再需要它了,但我找不到如何将 gcc 重新配置为正常。我尝试这样做

sudo apt-get install --reinstall gcc binutils

但它什么也没改变。我可以尝试使用 --purge,但这需要我卸载很多其他软件包(例如图形驱动程序 x_x)。有什么更简单的方法可以尝试吗?:)

谢谢!

更新

type -a

返回了 gcc 的两个路径,其中一个来自 tigcc。我删除了该文件,现在gcc --version显示正确的文件(4.8.2)。但是,我仍然收到相同的错误!:(

$ as --version
GNU assembler 2.16.1
Copyright 2005 Free Software Foundation, Inc.
This program is free software; you may redistribute it under the terms of
the GNU General Public License.  This program has absolutely no warranty.
This assembler was configured for a target of `m68k-coff'.

我不知道什么m68k-coff是/意味着什么...但我在 AMD x64 系统上!?

答案1

因此,在极不可能的情况下,如果有人遇到同样的问题并且不介意摆脱 TIGCC,我不得不删除/home/USER/bin/gcc/home/USER/bin/as

发行时

$ type -a
/usr/bin/gcc
/home/USER/bin/gcc

和 也是同样的事情as

相关内容