Jump to content

How do I get a compiler?


Recommended Posts

So far everything I have installed on my new Fedora machine has been an RPM. I am now working on installing Apache/MySQL/PHP using the instructions in Anyweb's tutorial (btw its been great so far!) I'm getting up to the point of compiling, and I do not have a compiler, cc or gcc. I've read several things, tried installing GCC from an RPM I found on google, but it did not work. I'm not sure if it's installed or not.

 

Does anyone know of a working GCC RPM I can use? Is it possible to get a compiler on a machine that doesn't have one to begin with?

 

Thanks in advance.

 

Justin

Link to post
Share on other sites

first of all you should search for rpms on rpmfind.net or freshrpms.net

second here is the easiest way to get gcc installed in your situation.

you can also use apt from now on for other installs.

 

get apt from http://apt.freshrpms.net

install it: rpm -ivh apt-*

run this: apt-get update && apt-get install gcc

Link to post
Share on other sites

<3 Grep.

 

Thx for the info. I already had apt installed as part of Anyweb's instructions for installing php/mysql/apache. I just couldn't figure out how to get a list of things that apt could install for me. Thanks VERY much for the info!

Link to post
Share on other sites

Ok I spoke too soon. I ran that command and all seemed to be well at first. It connected to apt and downloaded some files. It then moved the cursor to a blank line on the terminal. I let it sit for awhile, and it didn't do anything else, so I closed the terminal. Went to compile mySQL and I got the no compiler found in $PATH error again. So I try to install gcc again and this is the error I'm getting now.

 

[root@greatwhite /]# apt-get update && apt-get install gcc

E: Could not get lock /var/state/apt/lists/lock - open (11 Resource temporarily unavailable)

E: Unable to lock the list directory

[root@greatwhite /]#

 

Did I stop the first GCC install to soon? Should I have let it sit longer. I wasn't getting any on screen confirmation that it was doing anything. Should I su - before I install gcc? because I did.

Link to post
Share on other sites

do a reboot and try again, sounds like the rpm database is still in use by something in the background or its corrupt

 

if its corrupt dont worry just go and read this howto for info on repairing it

 

cheers

 

anyweb

Link to post
Share on other sites

Muchos gracias anyweb. That got me past the problem, AND my up2date is working now (it wasn't before).

 

However :( I have a new problem. When I do apt-get update && apt-get install gcc this is what I get:

 

[root@greatwhite /]# apt-get update && apt-get install gcc

Get:1 http://apt.physik.fu-berlin.de fedora/1/en/i386 release [1521B]

Get:2 http://ayo.freshrpms.net fedora/linux/1/i386 release [1992B]

Fetched 3513B in 0s (3846B/s)

Hit http://apt.physik.fu-berlin.de fedora/1/en/i386/at-testing pkglist

Hit http://ayo.freshrpms.net fedora/linux/1/i386/core pkglist

Hit http://ayo.freshrpms.net fedora/linux/1/i386/core release

Hit http://ayo.freshrpms.net fedora/linux/1/i386/updates pkglist

Hit http://ayo.freshrpms.net fedora/linux/1/i386/updates release

Hit http://apt.physik.fu-berlin.de fedora/1/en/i386/at-testing release

Reading Package Lists... Done

Building Dependency Tree... Done

Reading Package Lists... Done

Building Dependency Tree... Done

Segmentation fault

 

I'm guessing my problem is in the segmentation fault. I have done some googling and will continue to do so. I haven't been able to find a solution thus far though.

Link to post
Share on other sites

Just an update on my situation. I removed apt-get and synaptic

 

root@greatwhite /]# rpm -e synaptic
[root@greatwhite /]# rpm -e apt

 

I downloaded the atp rpm again, installed it, and I installed GCC fine.

 

/shrug

 

apt-get install gcc doesn't install G++, the GNU C++ compiler, so you will also need to do:

 

apt-get install gcc-c++

 

These are also required by G++, so you may or may not have to install them.

 

apt-get install libstdc++-devel
apt-get install libstdc++
apt-get install cpp

 

It won't hurt to try. If you already have them installed, then it lets you know.

 

Thanks again to you guys for your help!

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...