Installing GCC on SUSE 10 says cc not found
Hi All,
I am new to linux. I wanted to package my software as an RPM by rpmbuild command. When I run that it complained that gcc not found. I downloaded gcc and tried to install that from a tar ball. And it complained about cc: coomand not found. I dont know why is this error being shown because I think cc and gcc are the same. Correct me if I am wrong. My system details are: SUSE Linux Enterprise Server 10 (x86_64) VERSION = 10 PATCHLEVEL = 1 LSB_VERSION="core-2.0-noarch:core-3.0-noarch:core-2.0-x86_64:core-3.0-x86_64" I tried to download rpm files for gcc but they dont exist for Suse 10. |
I believe cc usually ends up being a symbolic link to gcc. If that link is broken or gcc not installed you will be getting error messages such as yours. As for the gcc tar ball. I guess you mean a source package? If you don't have cc or gcc it will be a "chicken or the egg" situation. You cannot use gcc to compile gcc because it doesn't exist yet. You will have to install a binary version of gcc.
|
i dont know much about suse but is there a software repository that can automatically install gcc (like yum or apt-get) ?
cc and gcc are not the same (but usually are sym-linked). it is essentially looking for a compiler to compile the gcc compiler (chicken/ egg). |
1 Attachment(s)
Welcome to LQ.
Please try this command : gcc -v If gcc is present, you can then do : cd /usr/bin/ ; # ln -s gcc cc With no gcc present, the only available packages, that will work on SLES 10 are the compat gcc / g++ version 3.4.6 for Slackware : http://connie.slackware.com/~alien/s...64-2compat.tgz > > gcc34-3.4.6-x86_64-2compat.tgz http://connie.slackware.com/~alien/s...64-2compat.tgz > > gcc34-g++34-3.4.6-x86_64-2compat.tgz They will provide /usr/gcc34/bin/gcc34 : g++34 Install with # sh installpkg <package>.tgz .. |
Quote:
If you still need help, you should edit the title of your thread to mention Suse, so you will get attention from people who do know the details. (Edit first post of the thread, click the Advanced button, then edit the title). The non detailed answer is that you should not try to install GCC from source nor from any other generic (not specific to Suse) form from gcc.gnu.org You should install GCC using your package manager (Yast or equivalent). Excuse this ignorance of SUSE, but are you using a distribution that normally requires paid support? If so have you paid for support? If you haven't paid for support, does that fact exclude you from access to the correct repositories? There is no reason to try to struggle around repository issues with an unpaid copy of a distribution for which payment expected. There are plenty of completely free Linux distributions. If you don't want to pay for support, start over with a distribution that is not set up on the assumption that you will pay for support. Obviously if you did pay for support, you have someone to ask about how to connect to the right repository so that installing GCC will be easy. |
Thank you all for replying to the post. Actually I am very very new to Linux. And (I have been asked to do something which is a bit complex i.e. RPM packaging.
I followed knudfl's method. Something happened at the command level But its still not installed. The output of the commands are spkisl867:/opt/RPM_Fawad # sh installpkg.sh gcc34-3.4.6-x86_64-2compat.tgz WARNING: pkgtools are unstable with tar > 1.13. You should provide a "tar-1.13" in your $PATH. Installing package gcc34-3.4.6-x86_64-2compat... PACKAGE DESCRIPTION: gcc34: gcc (Base GCC package with C support) gcc34: gcc34: GCC is the GNU Compiler Collection. gcc34: gcc34: This package contains those parts of the compiler collection needed gcc34: to compile C code. Other packages add C++, Fortran, Objective-C, gcc34: and Java support to the compiler core. gcc34: /sbin/ldconfig: File /usr/lib/libstdc++.so.6.0.6 is empty, not checked. Executing install script for gcc34-3.4.6-x86_64-2compat... AND spkisl867:/opt/RPM_Fawad # sh installpkg.sh gcc34-g++34-3.4.6-x86_64-2compat.tgz WARNING: pkgtools are unstable with tar > 1.13. You should provide a "tar-1.13" in your $PATH. Installing package gcc34-g++34-3.4.6-x86_64-2compat... PACKAGE DESCRIPTION: gcc34-g++34: gcc-g++ (C++ for GCC) gcc34-g++34: gcc34-g++34: C++ support for the GNU Compiler Collection. gcc34-g++34: gcc34-g++34: This package contains those parts of the compiler collection needed gcc34-g++34: to compile C++ code. The base gcc package is also required. gcc34-g++34: /sbin/ldconfig: File /usr/lib/libstdc++.so.6.0.6 is empty, not checked. Executing install script for gcc34-g++34-3.4.6-x86_64-2compat... You have new mail in /var/mail/root Now when I type in gcc I still do not find it. And once again I thank you all for your replies. |
Post # 6 : Looks OK.
Quote:
Please do these commands : which gcc34 ; which g++34 ; and : whereis gcc34 ; whereis g++34 ; also : gcc34 -v ; g++34 -v ( /usr/gcc34/bin/gcc34 -v ; /usr/gcc34/bin/g++34 -v ). ... To confirm that everything is OK. Using the new compiler : 'export CC=gcc34 CXX=g++34 && <other-command> , e.g. 'export CC=gcc34 CXX=g++34 && ./configure' or 'export CC=gcc34 CXX=g++34 && make' , if you have a Makefile. ( If gcc34 and g++34 isn't in your path, please use : export CC=/usr/gcc34/bin/gcc34 CXX=/usr/gcc34/bin/g++34 && <other-command> ). .. |
Found some more :
"ftp5.gwdg.de/pub/opensuse/repositories/devel:/gcc/SLE-10_SDK/x86_64" ftp://ftp5.gwdg.de/pub/opensuse/repo...10_SDK/x86_64/ Suggest : Install gcc43 + gcc43-c++. Provides : /usr/bin/gcc-4.3 , /usr/bin/g++-4.3 Install order : 1) libmpfr1 ftp://ftp.pbone.net/mirror/ftp5.gwdg...1.1.x86_64.rpm 2) libgcc43-4.3.4_20091019-25.1.x86_64.rpm 3) libgomp43-4.3.4_20091019-25.1.x86_64.rpm 4) cpp43-4.3.4_20091019-25.1.x86_64.rpm 5) gcc43-4.3.4_20091019-25.1.x86_64.rpm 6) libstdc++43-4.3.4_20091019-25.1.x86_64.rpm 7) libstdc++43-devel-4.3.4_20091019-25.1.x86_64.rpm 8) gcc43-c++-4.3.4_20091019-25.1.x86_64.rpm I don't have SLE_10 64bits, the above was tested with 32bits packages on SLE_10 32bits. .. |
All times are GMT -5. The time now is 03:38 PM. |