how to install gcc4.1 on ubuntu12.04
hello everbody:
I use ubuntu12.04,now I will use ns2.31 on ubuntu12.04,but when i install ns2.31 ,there have lots of errors. i search some same questions,the ns2.31 need gcc4.1 ,but ubuntu12.04 only gcc4.4. how can i install gcc4.1 on ubuntu12.04. thank you very much!!! |
Welcome to LQ.
gcc / g++ version 4.1.2 : Links, post #47 here .. http://www.linuxquestions.org/questi...532/page4.html sudo dpkg -i gcc41-compat-4.1.2-ubuntu1210_i386.deb g++41-compat-4.1.2_i386.deb ... Then reboot, and the new compiler can be used. Using : cd ns-allinone-2.31/ && export CC=gcc41 CXX=g++41 && ./install - |
I do it step by step according to knudfl'post ,but I don't success . has it another way ??thank you all. especial knudfl'post ,thank you!
|
# 3 .
Quote:
Please try this command : $ uname -m <Enter> The "i386" packages are usable on a 32bits (i686) OS only. And : ns2 is for a 32bits OS. Not everything may work, if it's 64bits. - |
Quote:
Thank you very much ! I now change to ubuntu10.10,but I get some message : (Reading database ... 119129 files and directories currently installed.) Preparing to replace cpp-4.1 4.1.2-27ubuntu1 (using cpp-4.1_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement cpp-4.1 ... Preparing to replace g++-4.1 4.1.2-27ubuntu1 (using g++-4.1_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement g++-4.1 ... Preparing to replace g++-4.1-multilib 4.1.2-27ubuntu1 (using g++-4.1-multilib_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement g++-4.1-multilib ... Preparing to replace gcc-4.1 4.1.2-27ubuntu1 (using gcc-4.1_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement gcc-4.1 ... Preparing to replace gcc-4.1-base 4.1.2-27ubuntu1 (using gcc-4.1-base_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement gcc-4.1-base ... Preparing to replace gcc-4.1-multilib 4.1.2-27ubuntu1 (using gcc-4.1-multilib_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement gcc-4.1-multilib ... Preparing to replace lib64stdc++6-4.1-dbg 4.1.2-27ubuntu1 (using lib64stdc++6-4.1-dbg_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement lib64stdc++6-4.1-dbg ... Preparing to replace libstdc++6-4.1-dbg 4.1.2-27ubuntu1 (using libstdc++6-4.1-dbg_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement libstdc++6-4.1-dbg ... Preparing to replace libstdc++6-4.1-dev 4.1.2-27ubuntu1 (using libstdc++6-4.1-dev_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement libstdc++6-4.1-dev ... Preparing to replace libstdc++6-4.1-pic 4.1.2-27ubuntu1 (using libstdc++6-4.1-pic_4.1.2-27ubuntu1_i386.deb) ... Unpacking replacement libstdc++6-4.1-pic ... dpkg: dependency problems prevent configuration of g++-4.1-multilib: g++-4.1-multilib depends on lib64stdc++6 (>= 4.1.2-27ubuntu1); however: Package lib64stdc++6 is not installed. dpkg: error processing g++-4.1-multilib (--install): dependency problems - leaving unconfigured Setting up gcc-4.1-base (4.1.2-27ubuntu1) ... dpkg: dependency problems prevent configuration of gcc-4.1-multilib: gcc-4.1-multilib depends on libc6-dev-amd64; however: Package libc6-dev-amd64 is not installed. gcc-4.1-multilib depends on lib64gcc1 (>= 1:4.1.2-27ubuntu1); however: Package lib64gcc1 is not installed. dpkg: error processing gcc-4.1-multilib (--install): dependency problems - leaving unconfigured dpkg: dependency problems prevent configuration of lib64stdc++6-4.1-dbg: lib64stdc++6-4.1-dbg depends on lib64stdc++6 (>= 4.1.2-27ubuntu1); however: Package lib64stdc++6 is not installed. dpkg: error processing lib64stdc++6-4.1-dbg (--install): dependency problems - leaving unconfigured Setting up libstdc++6-4.1-dbg (4.1.2-27ubuntu1) ... Setting up cpp-4.1 (4.1.2-27ubuntu1) ... Processing triggers for man-db ... Setting up gcc-4.1 (4.1.2-27ubuntu1) ... Setting up libstdc++6-4.1-dev (4.1.2-27ubuntu1) ... Setting up libstdc++6-4.1-pic (4.1.2-27ubuntu1) ... Setting up g++-4.1 (4.1.2-27ubuntu1) ... Errors were encountered while processing: g++-4.1-multilib gcc-4.1-multilib lib64stdc++6-4.1-dbg how can i do ? thanks! |
# 5 .
Quote:
Still looks like a 64bits OS ? And why not use a 32bits Ubuntu 12.04 ? ( Ubuntu 10.10 32bits is good with ns-2.26...2.29, but `10.10' is unsupported.) - |
Quote:
I use command: sudo dpkg -i *.deb my os is not 64bit,I will try 32bits Ubuntu 12.04. when compiling ns2.31 with gcc-4.4 and g++-4.4 ,there have lots of warnings such as: /common/packet.h:210: warning: deprecated conversion from string constant to ‘char*’ ./common/packet.h:211: warning: deprecated conversion from string constant to ‘char*’ ./common/packet.h:212: warning: deprecated conversion from string constant to ‘char*’ ./common/packet.h:213: warning: deprecated conversion from string constant to ‘char*’ ./common/packet.h:214: warning: deprecated conversion from string constant to ‘char*’ ./common/packet.h:215: warning: deprecated conversion from string constant to ‘char*’ ./common/packet.h:216: warning: deprecated conversion from string constant to ‘char*’ how can I do ??thanks !! |
Quote:
thanks ! |
# 8 .
Please do not quote your own posts. Delete, please. IDE : No reason to make things complicated. Quote:
This will do : tar xvf ns-allinone-2.31 && cd ns-allinone-2.31/ export CC=gcc41 CXX=g++41 && ./install Warnings are "informative text", not errors. - |
I have not success to install gcc-4.1 and g++-4.1 on Ubuntu 12.04.
I try as your tips. |
# 10 .
Sorry, should be : $ sudo dpkg -i gcc41-compat-4.1.2.ubu1204_i386.deb for the "gcc41-compat" : https://docs.google.com/file/d/0B7S2...it?usp=sharing The "g++-compat" : g++41-compat-4.1.2_i386.deb https://docs.google.com/file/d/0B7S2...it?usp=sharing - |
I download an install step by step ,but I don't find gcc-4.1
/usr/bin ls -al |grep gcc* I get :only gcc-4.6 how I do ??? thank you! |
# 12 .
How to check an executable : $ which gcc41 ... The answer better be : /usr/gcc41/bin/gcc41 A script that sets the PATH is included : /etc/profile.d/gcc41.sh ... which you will know from the file list : $ dpkg -L gcc41-compat - |
it's ok !I find it !thank you very much!
I do some steps as : rm /usr/bin /gcc ln -s /usr/gcc41/bin/gcc41 /usr/bin/gcc now I can use gcc-4.1? is it right? thank you! |
# 14 .
No. You cannot use "gcc-4.1" : There is no file with that name. Quote:
All versions of gcc can be used with : $ export CC=gcc<?> CXX=g++<?> && <other-command> ... Please read post #2 : $ cd ns-allinone-2.31/ && export CC=gcc41 CXX=g++41 && ./install What you can do with symlinks is : $ cd /usr/bin/ $ sudo ln -s ../gcc41/bin/gcc41 $ sudo ln -s ../gcc41/bin/g++41 - |
All times are GMT -5. The time now is 02:37 AM. |