Quote:
Originally Posted by Andrew Benton
I would advise you not to put gcc-2.95 in /usr/local as /usr/local/bin is probably in your $PATH so you will have two versions of gcc in your $PATH, one in /usr/bin and one in /usr/local/bin. This may cause problems. I would suggest that you install it somewhere out of the way, such as /opt/gcc-2.95. That way there is less chance of confusion. When you need to use it you can temporarily set the variable
export CC=/opt/gcc-2.95/bin/gcc
Install gcc-2.95 in /opt by doing
Code:
tar xzf gcc-2.95.3.tar.gz &&
mkdir gcc-build &&
cd gcc-build &&
../gcc-2.95.3/configure --prefix=/opt/gcc-2.95 --enable-languages=c,c++ &&
make bootstrap &&
make install
|
hi
i should install the gcc 2.95, i use RedHat7.2, and try these commands:
[root@localhost gcc-2.95]# export CC=/opt/gcc-2.95/bin/gcc
[root@localhost gcc-2.95]# tar xzf gcc-2.95.3.tar.gz && mkdir gcc-build && cd gcc-build &&/opt/gcc-2.95/gcc-2.95.3/configure --prefix=/opt/gcc-2.95 --enable-languages=c,c++ && make bootstrap && make install
but it gives me this:
"configuring for a i686-pc-linux-gnuoldldhost.
created "makefile" in /opt/gcc-2.95/gcc-build
/opt/gcc-2.95/gcc-2.95.3/configure: /opt/gcc-2.95/bin/gcc: No such file or directory
***the commanad 'cc -o conftest -g conftest.c' failed.
***you must set the enviroment variable CC to a working compiler."
by the way, when i check the /usr/local/bin folder, it's empty, is that ok?