比尔盖子 博客

Gentoo GCC报错解决

今天,比尔盖子在更新了GCC之后,运行了emerge –depclean。然后GCC就不工作了!
每当运行GCC,就得到一个提示:

 

* gcc-config: Active gcc profile is invalid!
[1] i686-pc-linux-gnu-4.5.3

 

比尔盖子吓坏了,因为如果GCC被误删了,那么比尔盖子就没法安装任何软件了,怎么办呢……后来,比尔盖子搜索了一下这个错误提示,发现解决方案原来这么简单!

#第一步依然会报错,不要紧张,这是预料之中的事情。
#你需要在第一条命令报错后接着运行下面的命令
gcc-config -c
gcc-config i686-pc-linux-gnu-4.5.3
gcc-config -c

然后GCC就正常了,世界又恢复了美好……

后来反思了一下报错的原因,比尔盖子认为原因应该是:比尔盖子的系统在删除旧版本GCC之前,有两个GCC并存,而且默认使用旧版本GCC。而现在删掉旧版本的GCC之后,由于系统内所有的配置文件都指向旧版本GCC,但旧版本GCC已经不存在了,GCC还能工作吗?而上面的命令,就是将配置文件改成新版本GCC,最终让GCC恢复正常。

 

Categories: Linux

Nginx导致CSS无法解析 » « 按照最新规范修改启动脚本

发表评论

Your email address will not be published.

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    
    Markdown is turned off in code blocks:
     [This is not a link](http://example.com)

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see http://daringfireball.net/projects/markdown/syntax

Copyright © 2023 比尔盖子 博客

Theme by Anders NorenUp ↑