C++ G++ 错误:/usr/lib/rpm/redhat/redhat-hardened-cc1: 没有那个文件或目录

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/34624428/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-28 14:24:29  来源:igfitidea点击:

G++ error:/usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory

c++fedora

提问by xinshouke

I'm studying qt on platform Fedora linux, It threw a g++ error as below while I make a sample cpp

我正在 Fedora linux 平台上学习 qt,它在我制作示例 cpp 时抛出了如下的 g++ 错误

g++ error:/usr/lib/rpm/redhat/redhat-hardened-cc1: No such file or directory

Would who indicate how to do for me please?

请谁指出如何为我做?

回答by Jakuje

You need to install redhat-rpm-configwhich is required by some of the qtswitches, probably:

您需要安装redhat-rpm-config某些qt交换机所需的,可能是:

sudo dnf install redhat-rpm-config

From AskFedora.

来自AskFedora

回答by Slava

According to thistopic installation of the package redhat-rpm-configshould fix this problem.

根据这个主题安装包redhat-rpm-config应该可以解决这个问题。

/usr/lib/rpm/redhat/redhat-hardened-cc1 is included in the package redhat-rpm-config. I had a similiar issue on a local development system and installing this package solved the issue for me.

/usr/lib/rpm/redhat/redhat-hardened-cc1 包含在软件包 redhat-rpm-config 中。我在本地开发系统上遇到了类似的问题,安装这个包为我解决了这个问题。