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

Tags used in this thread
Popular LQ Tags , , ,

Reply
 
Thread Tools
Old 10-24-2009, 11:33 PM   #1
charix
LQ Newbie
 
Registered: Oct 2009
Posts: 2
Thanked: 0
installing gcc 3.4 in ubuntu 8.4


[Log in to get rid of this advertisement]
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!!!
linuxubuntu charix is offline  
Tag This Post , ,
Reply With Quote
Old 10-25-2009, 06:17 AM   #2
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,914
Thanked: 269
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 06:25 AM..
linuxpclinuxos knudfl is offline  
Tag This Post
Reply With Quote
Old 10-26-2009, 09:32 AM   #3
charix
LQ Newbie
 
Registered: Oct 2009
Posts: 2
Thanked: 0

Original Poster
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
linuxubuntu charix is offline     Reply With Quote
Old 10-26-2009, 02:33 PM   #4
knudfl
Senior Member
 
Registered: Jan 2008
Location: Copenhagen, Denmark
Distribution: pclos2009.2, slack13, Debian Lenny (+30 others, for test only)
Posts: 2,914
Thanked: 269
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++
.....
linuxpclinuxos knudfl is offline     Reply With Quote
Old 10-26-2009, 02:46 PM   #5
John VV
Senior Member
 
Registered: Aug 2005
Location: Ann Arbor Mi.
Distribution: Arch Linux ,CentOS 5.4
Posts: 2,148
Thanked: 124
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
linuxfedora John VV is offline     Reply With Quote

Reply

Bookmarks


Thread Tools

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 03:52 PM
gcc in ubuntu ikarthik Linux - Newbie 4 09-19-2008 03:10 PM
installing emacs and gcc in ubuntu without a network connection nunya_biniss Linux - Newbie 1 10-05-2007 03:41 PM
installing gcc 3.3.6 on Ubuntu 6.10 enzom83 Linux - Software 1 12-29-2006 12:00 PM
Installing GCC 3.1 over GCC 2.96...? aaronluke Linux - General 3 09-27-2002 06:28 AM


All times are GMT -5. The time now is 04:00 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
RSS2  LQ Podcast
RSS2  LQ Radio
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: @linuxquestions
Open Source Consulting | Domain Registration