Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • 1
    What's a "system file", and what type of access would one need for it? Why would using sudo be required for building a piece of software? Usually, sudo would only ever be required if the software was to be installed in a location that is not writable by non-root users (and the user in this question does not get that far). Using sudo just because one gets "permission denied" is a less than ideal security policy. It would be better to understand why the error occurs, and how to solve it properly, so that building the software can be done without sudo (as is commonly the case). Commented Nov 22, 2021 at 15:21
  • @they He is probably right, see this question: askubuntu.com/questions/1119264/… Commented Nov 23, 2021 at 8:44
  • 1
    @switch87 but the OP was using RHEL, not Ubuntu. In any case, using sudo is wrong here, and the correct fix for the problem you’re referring to would be to fix the permissions. Commented Nov 23, 2021 at 9:59
  • @StephenKitt Apparently the problem is also there in RHEL and is probably a bug in the compiler package not linked to a distribution. But to solve it, in any case, you need root permissions. If this should not be is not the question here. It is what it is untill it is fixed at the root of the problem. so the answer that you need sudo permissions is right. Commented Nov 23, 2021 at 11:06
  • @switch87 given that GCC needs a working as to build itself, I very much doubt this could be a “bug in the compiler package not linked to a distribution”; in fact it wouldn’t likely be a bug in distribution-specific packages either (although technically, one could build a GCC package, ship that, and then build a broken binutils package; but for both RHEL and Ubuntu to do so without realising...). But the point I’m objecting to is that the answer seems to suggest using sudo to run ./configure, which isn’t a good idea. Commented Nov 23, 2021 at 12:17