LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 10-24-2009, 10:33 PM   #1
charix
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Rep: Reputation: 0
installing gcc 3.4 in ubuntu 8.4


hey guys am bit new to linux and am having a hard time installing gcc 3.4 instead of gcc 4.2.4. when i try install by

sudo apt-get install gcc 3.4 t gives

Building dependency tree
Reading state information... Done
gcc-3.4 is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

then i tried changing symbolic links

> sudo rm cpp gcc g++
>sudo ln -s g++-3.4 g++
> sudo ln -s gcc-3.4 gcc
> sudo ln -s cpp-3.4 cpp

then

>sudo rm i486-linux-gnu-gcc i486-linux-gnu-g++ i486-linux-gnu-cpp

then

sudo ln -s cpp-3.4 i486-linux-gnu-cpp
sudo ln -s g++-3.4 i486-linux-gnu-g++
sudo ln -s gcc-3.4 i486-linux-gnu-gcc

but now when i try gcc -v

Unable to exec gcc.real: No such file or directory

then i tried

CC=gcc-3.4 CXX=g++-3.4
for cpp -v & g++-v it gives that its the gcc 3.4 but for gcc -v it gives

Unable to exec gcc.real: No such file or directory
can someone help??
thnaks!!!
 
Old 10-25-2009, 05:17 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Welcome to LQ.
Quote:
sudo ln -s cpp-3.4 i486-linux-gnu-cpp
sudo ln -s g++-3.4 i486-linux-gnu-g++
sudo ln -s gcc-3.4 i486-linux-gnu-gcc
That will not work.

Please delete the links, linking is not the way to do it.
( Usually not, and definitely not the way you did.)
.. And you will have to reinstall gcc cpp g++ .

You can have as many compilers, as you want.
Examples, using compilers :

./configure CC=gcc-3.4 CXX=g++-3.4
./configure CC=gcc-4.1 CXX=g++-4.1
and / or
make CC=gcc-3.4 CXX=g++-3.4
make CC=gcc-4.1 CXX=g++-4.1

gcc-3.4 -o <object> file.c
.....
gcc -v , gcc-4.1 -v , gcc-3.4 -v .
.....

Last edited by knudfl; 10-25-2009 at 05:25 AM.
 
Old 10-26-2009, 08:32 AM   #3
charix
LQ Newbie
 
Registered: Oct 2009
Posts: 2

Original Poster
Rep: Reputation: 0
hey thnx for ur advice

can u let me know the way to delete the links and how to install gcc,cpp,g++ again thnx
 
Old 10-26-2009, 01:33 PM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Please open the terminal window and type these commands :

1) cd /usr/bin/
2) sudo rm cpp
3) sudo rm gcc
4) sudo rm g++
5) sudo rm i486-linux-gnu-cpp
6) sudo rm i486-linux-gnu-g++
7) sudo rm i486-linux-gnu-gcc
.. which should include all the links, you made.

8) sudo apt-get install cpp gcc g++
.....
 
Old 10-26-2009, 01:46 PM   #5
John VV
LQ Muse
 
Registered: Aug 2005
Location: A2 area Mi.
Posts: 17,623

Rep: Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651Reputation: 2651
why do you need gcc 3.4 ? for some very old code?
if it is newer code then some small hacks will get in compliance with gcc 4.4
http://gcc.gnu.org/gcc-4.3/porting_to.html
and
http://gcc.gnu.org/gcc-4.4/porting_to.html
 
  


Reply

Tags
gcc, installing



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
Installing vmware on Open Suse 11.1 - Requires original gcc 4.32 - gcc now 4.3 cyclops.matrix Linux - Software 2 08-31-2009 02:52 PM
gcc in ubuntu ikarthik Linux - Newbie 4 09-19-2008 02:10 PM
installing emacs and gcc in ubuntu without a network connection nunya_biniss Linux - Newbie 1 10-05-2007 02:41 PM
installing gcc 3.3.6 on Ubuntu 6.10 enzom83 Linux - Software 1 12-29-2006 11:00 AM
Installing GCC 3.1 over GCC 2.96...? aaronluke Linux - General 3 09-27-2002 05:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 01:55 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration