Ask Your Question

how to get gcc when I am not root user and fedora won't accept yum code.

asked 2016-02-16 18:10:57 -0600

this post is marked as community wiki

This post is a wiki. Anyone with karma >750 is welcome to improve it.

I am extremely new to linux having only installed fedora yesterday.I have come across several issues already. But the main one is that it doesn't appear to have any libraries attached to it. I established that i appear to need GCC. I found the code yum however suggested that I use the following text:

su - yum groupinstall " Development Tools" "Development Libraries "

I put this into the terminal and it returned with command that I must do this under root user. currently my user id appears to be my name@localhost documents but i have no idea how to change this. I have to say I'm becoming more and more frustrated. Please can someone help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-02-16 19:47:08 -0600

sideburns gravatar image

updated 2016-02-17 11:36:24 -0600

florian gravatar image

Welcome to ask.fedora. You seem to have a bit of a syntax error there because su - logs you in as root and doesn't take any other commands as arguments. (If you'd put a username after the dash, it would log you in as that user.) To run that one command as root, you need to use su -c 'yum groupinstall "Development Tools" "Development Libraries"' instead. Note that the single quotes around the entire yum command are needed so that su "understands" that it's all one extended command, unlike using sudo which just passes everything along as is.

edit flag offensive delete link more


Little side comments:

  • yum has been replaced by dnf in Fedora 22. So maybe, you want to adjust your command to something like this: sudo dnf groupinstall "Development Tools" "Development Libraries".
  • "Development Tools" "Development Libraries" will install plenty of packages. You may want to consider installing only the packages that you really need. Try dnf search gcc-* (e.g. sudo dnf install gcc gcc-c++ and so on...).
florian gravatar imageflorian ( 2016-02-17 11:35:10 -0600 )edit

Hello There thank you for the answer posted. This is what happened. I'm real sorry if I'm doing something really stupid.

[Houndhill@localhost Documents]$ su-houndhill bash: su-houndhill: command not found... [Houndhill@localhost Documents]$ -houndhill bash: -houndhill: command not found... [Houndhill@localhost Documents]$

Houndhill gravatar imageHoundhill ( 2016-02-17 13:11:37 -0600 )edit

Flarian your awesome. sudo dnf groupinstall "Development Tools" "Development Libraries"this worked and now looks like its doing something. Thanks so much I will get the hang of this.

Houndhill gravatar imageHoundhill ( 2016-02-17 13:15:40 -0600 )edit

su-houndhill is not a valid command. -houndhill isn't either.

Type this in your terminal to learn about the su command: man su (q to quit). To change from user Houndhill to root, just type su or su -, to return you type exit. To change from any user to user B you type su B. To execute a command as root you would type: su -c "command" or simply sudo command, and so on...

Please consider deleting this answer since it is not really relevant...

florian gravatar imageflorian ( 2016-02-17 13:43:29 -0600 )edit

Question Tools


Asked: 2016-02-16 18:10:57 -0600

Seen: 655 times

Last updated: Feb 17 '16