Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to install some software on my Linux computer (PHP and MySql), but there is no c compiler on it.
I have tried gcc, but you need a c compiler in order to install that c compiler!!!
Can anyone please let me know how to install a c compiler to start with?
Thanks a lot in advance.
PS. I'm accessing the Linux server remotely through ssh.
There are numerous tools that you could use, but it depends on if you have them installed. If you're on SuSE, for example, you can just run "yast2" on the command line and it will take you to the ncurses (text mode) yast panels and you can install from "Software Management". From there you can just do a search for "gcc" and it will bring up the required packages. Other tools are wget or apt-get.
You don't always have to install software on linux by compiling using c. There are frequently binary installations (including for php and mysql) built already for your system (so you just install an rpm or whatever). The same should go for gcc.
I think it is Red Hat 9, but I'm not completely sure. Could you please tell me how to find out?
Thanks.
Quote:
Originally Posted by PerfectStranger
There are numerous tools that you could use, but it depends on if you have them installed. If you're on SuSE, for example, you can just run "yast2"
No yast2 unfortunately.
Quote:
Originally Posted by PerfectStranger
You don't always have to install software on linux by compiling using c. There are frequently binary installations (including for php and mysql) built already for your system (so you just install an rpm or whatever). The same should go for gcc.
Well, my experience with rpms is that they always depend on something else I don't have on my system, in an infinite chain that never seems to end...! I tried once and had to give up when I had installed like 5 unrelated packages and still saw no light at the end of the tunnel. And this was trying to install php in a server which already had a previous version of php!
Check out ...rpmseek.com where you will find pre packed packages (3P ) for nearly every distro.
Thanks a lot for the link.
But I'm afraid, under compilers, I only found gcc-m68k-linux-20010415-1 .i386.rpm, which seems to be a "gcc m68k cross compiler". Not what I need, or am I wrong?
Well, my experience with rpms is that they always depend on something else I don't have on my system, in an infinite chain that never seems to end...! I tried once and had to give up when I had installed like 5 unrelated packages and still saw no light at the end of the tunnel. And this was trying to install php in a server which already had a previous version of php!
On Fedora Core 4 and 5 you have yum and it resolves your dependencies for rpms. It's just very simple... I don't know if you have it on older distros...
Well, my experience with rpms is that they always depend on something else
thats true but there is a option were rpm does not check for dependencies. It just installs thing. You have to later install the required packages but thats another story. (I'm not so into rpm so can't provide you with any further info)
Quote:
No yast2 unfortunately.
If you wanna learn something about linux be happy to not have yast. Spoonfood (TM).
Quote:
Why can't things be as easy as a Windows install?
If you want that: Install SUSE.
Quote:
But I'm afraid, under compilers, I only found gcc-m68k-linux-20010415-1 .i386.rpm, which seems to be a "gcc m68k cross compiler". Not what I need, or am I wrong?
Did you put in your distro under advanced search? Look out for gcc-3.4... or the newer gcc-4...
I'm not sure like it is with rpm, but you should get a listing of already installed rpm/packages. If you have so many failed dependencies it looks either like a real minimum installation or a broken one.
Could you please tell us how you installed the system.
Quote:
I think it is Red Hat 9, but I'm not completely sure. Could you please tell me how to find out?
check out your /etc folder their should be some thing like a version file. Do a
ls /etc/*version*
I can only tell from slackware. So sorry if this does not apply to Red Hat.
It might also be a solution to just get the php and mysql packages from rpmseek and see if you can add them to the system instead of compiling them by hand (What i think is causing all your grief).
thats true but there is a option were rpm does not check for dependencies. It just installs thing. You have to later install the required packages but thats another story. (I'm not so into rpm so can't provide you with any further info).
But the installed software would not work until I install the dependencies, right? I don't see the point then in installing ignoring dependencies...
Quote:
Originally Posted by zhjim
I'm not sure like it is with rpm, but you should get a listing of already installed rpm/packages. If you have so many failed dependencies it looks either like a real minimum installation or a broken one.
Could you please tell us how you installed the system.
I didn't, I rented the server and they had already made the installation for me (but any extra software installation by them would cost me money... )
Quote:
Originally Posted by zhjim
check out your /etc folder their should be some thing like a version file. Do a
ls /etc/*version*
I can only tell from slackware. So sorry if this does not apply to Red Hat.
No *version* file, but I found a text file named redhat-release which contains a single line:
Red Hat Linux release 9 (Shrike)
So I guess that confirms what my distro is (though it does not seem like a serious way for an OS to indicate its version, what if someone deletes, or even changes that test file?!).
And does anyone know what (Shrike) means?
Quote:
Originally Posted by zhjim
It might also be a solution to just get the php and mysql packages from rpmseek and see if you can add them to the system instead of compiling them by hand (What i think is causing all your grief).
Well, as I mentioned, I already tried that some time ago and had to quit in despair because of the unending sequence of dependencies.
I was hoping that compiling the source was the way to go, but it seems there is no controlled way to do that either!...
Did you put in your distro under advanced search? Look out for gcc-3.4... or the newer gcc-4...
Thanks a lot for that hint. I have tried now and I did find several gcc packages which were wrongly classified under /Development/Languages instead of /Development/Compilers
The problem now is that there are *several* packages. Which one is the correct one? They are all described as "The GNU cc and gcc C compilers.":
gcc-3.2.2-5.src.rpm
gcc-3.2.2-5.i386.rpm
gcc-2.95.1-3.src.rpm
If my server is a pc, then the correct architecture is always i386?
Shrike is the name of the Red Hat Version. They just sometime started to give them names in advance to the numbers.
Quote:
I was hoping that compiling the source was the way to go, but it seems there is no controlled way to do that either!
Most of the time its easier to install the packages. Most of the time.
But when compiling you definetly learn more.
Quote:
If my server is a pc, then the correct architecture is always i386?
Depends if you have a 64bit CPU you would use i686 or similar. But can't realy do anything wrong with i386. Most of the time you would choose the packages with the highest numbers. But sometimes packages want other packages with a special version number.
In your case go with the gcc-3.2.2-5.i386.rpm
Hope you're getting there. But it still seams odd to me that you have so many failed dependcies.
You are going to need much more than just the gcc package. Gcc is also going to need make, etc ad infinity.
You need to find the gcc RPMs (aka developer tools) which shipped on the CDs with redhat 9. Going through rpmfind is going to be a disaster for this. The GCC tools should be part of any install, so yes, I would take it up with your hosting provider. They may be able to install those tools for you.
Finding a tree of the stock redhat 9.0 rpms should be easy enough, though it is no longer supported so you'll have to look elsewhere than redhat.com. For example, everything you need used to be found at:
PS - Don't bother trying to put Yum on this RH9.0 box. You'll run into trouble trying to find a compatible repository that won't want to upgrade your entire box when you 'yum install gcc'. Search for the stock 'developer tools' rpms which will include gcc, make, autoconf, etc.
Well, someone on another forum told me about up2date, and that solved the problem of installing a c compiler. It downloaded the gcc package, with all its dependants and installed them in the correct order. It was great!
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.