LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Installing gcc - need help (https://www.linuxquestions.org/questions/linux-software-2/installing-gcc-need-help-624221/)

Jinouchi 02-27-2008 08:52 AM

Installing gcc - need help
 
Ok, so I've been trying to install several programs lately and they all give me an
Code:

error: C compiler cannot create executables
I downloaded the gcc package from the debian site ( http://packages.debian.org/etch/gcc ) and I don't know how to install it. There's no configure program, and nothing else that means anything to me. This is all that's in the file:
Code:

/gcc-defaults-1.50# dir
c89    c99    classpath.security  gfdl.7  sparc-g++.c
c89.1  c99.1  debian              gpl.7  sparc-gcc.c
/gcc-defaults-1.50# dir debian
changelog        g77.postinst.in      gpc.prerm
chill.substvars  g77.prerm            g++.postinst.in
compat            gcc-doc.postinst      g++.prerm
control          gcc-doc.prerm        lib32gcj-bc.overrides
control.doc      gcc.postinst.in      libgcj-bc.overrides
copyright        gcc.preinst          libgcj-common.postinst
cpp-doc.postinst  gcc.prerm            libgcj-common.prerm
cpp-doc.prerm    gfortran.postinst.in  README.Debian
cpp.postinst      gfortran.prerm        README.Debian.m4
cpp.prerm        gij.prerm            rebuild-gcj-db
disable_64_gcc    gpc-doc.postinst      rebuild-security-providers
g77-doc.postinst  gpc-doc.prerm        rules
g77-doc.prerm    gpc.postinst

How do I install this? Also, what dir are you supposed to install these types of system files in?

mahmoud 02-27-2008 09:32 AM

try using aptitude or use apt-get install packagename or
dpkg -i name.deb

Jinouchi 02-28-2008 10:19 AM

I've tried that, but I always get this error:
Code:

# apt-get install gcc
Reading package lists... Done
Building dependency tree... Done
gcc is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 2 not upgraded.
1 not fully installed or removed.
Need to get 0B of archives.
After unpacking 0B of additional disk space will be used.
Setting up lighttpd (1.4.13-4etch4) ...
Starting web server: lighttpd failed!
invoke-rc.d: initscript lighttpd, action "start" failed.
dpkg: error processing lighttpd (--configure):
 subprocess post-installation script returned error exit status 1
Errors were encountered while processing:
 lighttpd
E: Sub-process /usr/bin/dpkg returned an error code (1)

How do I fix this?

Jinouchi 02-29-2008 08:24 AM

Bump - need help now fixing lighttpd too. I need to get my C compiler working before i can install almost anything. Can someone help?

Jinouchi 03-01-2008 07:29 PM

Bump - need to get C compiler installed

gr8scot 03-20-2008 01:54 PM

symlink to installed version of GNU C compiler
 
Quote:

Originally Posted by Jinouchi (Post 3075206)
Bump - need to get C compiler installed

If you're using gcc-2.96
Code:

ln -s /usr/bin/gcc-2.96 /usr/bin/gcc

Jinouchi 04-08-2008 07:52 PM

Quote:

Originally Posted by gr8scot (Post 3095189)
If you're using gcc-2.96
Code:

ln -s /usr/bin/gcc-2.96 /usr/bin/gcc

Well, I tried that, and it worked, but then I had to reformat my drive and reinstall Debian, and now it won't work. I try to install Wine and here's what appears to be the applicable part of the config.log:

Code:

configure:2588: $? = 0
configure:2595: gcc -v >&5
Using built-in specs.
Target: i486-linux-gnu
Configured with: ../src/configure -v --enable-languages=c,c++,fortran,objc,obj-c++,treelang --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --program-suffix=-4.1 --enable-__cxa_atexit --enable-clocale=gnu --enable-libstdcxx-debug --enable-mpfr --with-tune=i686 --enable-checking=release i486-linux-gnu
Thread model: posix
gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)
configure:2598: $? = 0
configure:2605: gcc -V >&5
gcc: '-V' option must have argument
configure:2608: $? = 1
configure:2631: checking for C compiler default output file name
configure:2658: gcc    conftest.c  >&5
/usr/bin/ld: crt1.o: No such file: No such file or directory
collect2: ld returned 1 exit status
configure:2661: $? = 1
configure:2699: result:
configure: failed program was:
| /* confdefs.h.  */

| #define PACKAGE_NAME "Wine"
| #define PACKAGE_TARNAME "wine"
| #define PACKAGE_VERSION "0.9.59"
| #define PACKAGE_STRING "Wine 0.9.59"
| #define PACKAGE_BUGREPORT "wine-devel@winehq.org"
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|  ;
|  return 0;
| }
configure:2706: error: C compiler cannot create executables
See `config.log' for more details.

Looks to my n00bie eyes like a file called crt1.o is missing. Am I correct, and how do I fix this?

indikabandara19 04-09-2008 12:24 AM

I'm not familiar with debian, though I came across the same problem with Fedora.
Installing glibc and glibc-devel helped me


All times are GMT -5. The time now is 11:22 PM.