LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This 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

Reply
 
Search this Thread
Old 05-26-2006, 10:02 AM   #1
czamora
Member
 
Registered: May 2006
Posts: 52

Rep: Reputation: 15
Unhappy Software installation from command line


Hi,

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.
 
Old 05-26-2006, 10:08 AM   #2
PerfectStranger
LQ Newbie
 
Registered: Dec 2005
Distribution: SuSE
Posts: 20

Rep: Reputation: 0
What distribution are you using?

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.
 
Old 05-26-2006, 10:25 AM   #3
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,465
Blog Entries: 11

Rep: Reputation: 184Reputation: 184
Check out http://www.rpmseek.com where you will find pre packed packages (3P ) for nearly every distro.
 
Old 05-26-2006, 05:43 PM   #4
czamora
Member
 
Registered: May 2006
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by PerfectStranger
What distribution are you using?
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!

Why can't things be as easy as a Windows install?
 
Old 05-26-2006, 05:50 PM   #5
czamora
Member
 
Registered: May 2006
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by zhjim
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?
 
Old 05-26-2006, 06:03 PM   #6
zahadumy
Member
 
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226

Rep: Reputation: 31
Quote:
Originally Posted by czamora
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...
 
Old 05-27-2006, 12:24 AM   #7
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,465
Blog Entries: 11

Rep: Reputation: 184Reputation: 184
Quote:
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).
 
Old 05-27-2006, 04:47 AM   #8
czamora
Member
 
Registered: May 2006
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by zhjim
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!...
 
Old 05-27-2006, 04:58 AM   #9
czamora
Member
 
Registered: May 2006
Posts: 52

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by zhjim

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?
 
Old 05-27-2006, 07:07 AM   #10
zhjim
Senior Member
 
Registered: Oct 2004
Distribution: Debian Squeeze x86_64
Posts: 1,465
Blog Entries: 11

Rep: Reputation: 184Reputation: 184
Quote:
And does anyone know what (Shrike) means?
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.
 
Old 05-27-2006, 04:47 PM   #11
czamora
Member
 
Registered: May 2006
Posts: 52

Original Poster
Rep: Reputation: 15
Well, dependencies are bach again!...
This is what I get:

# rpm -ivh gcc-3.2.2-5.i386.rpm
error: Failed dependencies:
cpp = 3.2.2-5 is needed by gcc-3.2.2-5
glibc-devel >= 2.2.90-12 is needed by gcc-3.2.2-5


Should I complain to my host company for providing such a software-deprived Linux?
 
Old 05-27-2006, 05:54 PM   #12
zahadumy
Member
 
Registered: May 2005
Location: Cluj, Romania
Distribution: Fedora Core 6
Posts: 226

Rep: Reputation: 31
Just my 2 cents again... Do you have yum on Red Hat 9? If you do, try it... it does the dependencies thing for you. If not, sorry for this...
 
Old 05-27-2006, 11:06 PM   #13
Shade
Senior Member
 
Registered: Mar 2003
Location: Burke, VA
Distribution: RHEL, Slackware, Ubuntu, Fedora
Posts: 1,418
Blog Entries: 1

Rep: Reputation: 46
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:

http://ftp.redhat.com/pub/redhat/lin...6/RedHat/RPMS/

edited to add: ftp://ftp.chu.edu.tw/Linux/RedHat/9/...6/RedHat/RPMS/
That link still works, though it appears a bit slow.

-- Shade

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.

Last edited by Shade; 05-27-2006 at 11:12 PM.
 
Old 05-28-2006, 07:01 PM   #14
czamora
Member
 
Registered: May 2006
Posts: 52

Original Poster
Rep: Reputation: 15
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!

A small side-question: what is autoconf?
 
  


Reply

Tags
basic, compiler, compiling, gcc, help, procedure, software


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I install software from the command line on slackware 10.2? v@ny@ Linux - Newbie 8 12-15-2005 03:53 AM
How do I install software trough the command line ??? ivancauso Linux - Newbie 12 08-16-2005 10:59 PM
command line software install sog777 Mandriva 5 05-16-2005 08:39 PM
Help for Dummies (Command line installation) neji Linux - Newbie 1 03-04-2005 04:38 PM
command line program installation popcorn5714 Linux - Newbie 4 09-14-2002 03:22 AM


All times are GMT -5. The time now is 12:02 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration