Strona 1 z 1

[+] Kompilator nie mógł - ,,cannot create executables''

: 17 stycznia 2009, 15:38
autor: Ad4m
Witam.
Wiem, że zapewne dla was ten problem jest banalny lecz jestem nowy i całkowicie zielony jak na razie w tych sprawach. Więc tak, przekopałem wiele for internetowych by znaleźć sposób na zainstalowanie kompilatora gcc pod Debianem. Zrobiłem to metodą

Kod: Zaznacz cały

apt-get install gcc
Wszystko się zainstalowało. Jak wpisuje

Kod: Zaznacz cały

gcc -v
to wyskakuje mi coś takiego:
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)
Teraz jak chcę coś skompilować, np. otworzyć plik ./configure w kadu to wywala mi:
checking build system type... i686-pc-linux-gnu
checking host system type... i686-pc-linux-gnu
checking target system type... i686-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for gawk... no
checking for mawk... mawk
checking whether make sets ${MAKE}... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking for C++ compiler default output... configure: error: C++ compiler cannot create executables
Wiem, że takich tematów było już sporo lecz żaden mi nie pomógł i nadal się z tym męczę.

Z góry dziękuję.

: 17 stycznia 2009, 16:15
autor: maly
Doinstaluj:

Kod: Zaznacz cały

apt-get install build-essential

: 17 stycznia 2009, 16:32
autor: Ad4m
Użyłem tej opcji i wyszło to
adam:/home/ad4m# apt-get install build-essential
Czytanie list pakietów... Gotowe
Budowanie drzewa zależności... Gotowe
Zostaną zainstalowane następujące dodatkowe pakiety:
g++ g++-4.1 libc6-dev libstdc++6-4.1-dev linux-kernel-headers
Sugerowane pakiety:
gcc-4.1-doc lib64stdc++6 glibc-doc manpages-dev libstdc++6-4.1-doc
Zostaną zainstalowane następujące NOWE pakiety:
build-essential g++ g++-4.1 libc6-dev libstdc++6-4.1-dev
linux-kernel-headers
0 aktualizowanych, 6 nowo instalowanych, 0 usuwanych i 0 nieaktualizowanych.
Konieczne pobranie 0B/8850kB archiwów.
Po rozpakowaniu zostanie dodatkowo użyte 38,3MB miejsca na dysku.
Czy chcesz kontynuować [T/n]? T
Nie udało się pobrać cdrom:[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-1 20070407-11:40]/pool/main/l/linux-kernel-headers/linux-kernel-headers_2.6.18-7_i386.deb Błędna suma MD5
E: Nie udało się pobrać niektórych archiwów, spróbuj uruchomić apt-get update lub użyć opcji --fix-missing

i nadal nie działa.
Gdy uruchomiłem
apt-get update
to wyszło to:
adam:/home/ad4m# apt-get update
Ign cdrom://[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-1 20070407-11:40] etch Release.gpg
Ign cdrom://[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-1 20070407-11:40] etch Release
Ign cdrom://[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-1 20070407-11:40] etch/contrib Packages/DiffIndex
Ign cdrom://[Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-1 20070407-11:40] etch/main Packages/DiffIndex
Pob: 1 http://ftp.pl.debian.org etch Release.gpg [386B]
Traf http://ftp.pl.debian.org etch Release
Ign http://ftp.pl.debian.org etch/main Packages/DiffIndex
Ign http://ftp.pl.debian.org etch/main Sources/DiffIndex
Traf http://ftp.pl.debian.org etch/main Packages
Traf http://ftp.pl.debian.org etch/main Sources
Pob: 2 http://security.debian.org etch/updates Release.gpg [189B]
Traf http://security.debian.org etch/updates Release
Ign http://security.debian.org etch/updates/main Packages/DiffIndex
Ign http://security.debian.org etch/updates/contrib Packages/DiffIndex
Ign http://security.debian.org etch/updates/main Sources/DiffIndex
Ign http://security.debian.org etch/updates/contrib Sources/DiffIndex
Traf http://security.debian.org etch/updates/main Packages
Traf http://security.debian.org etch/updates/contrib Packages
Traf http://security.debian.org etch/updates/main Sources
Traf http://security.debian.org etch/updates/contrib Sources
Pobrano 2B w 6s (0B/s)
Czytanie list pakietów... Gotowe

: 17 stycznia 2009, 16:40
autor: maly
sources.list i wstaw # przed:

Kod: Zaznacz cały

deb cdrom: [Debian GNU/Linux 4.0 r0 _Etch_ - Official i386 DVD Binary-1 20070407-11:40]/ etch contrib main

Kod: Zaznacz cały

apt-get update
apt-get dist-upgrade
i później dociągnij build-essential.

: 17 stycznia 2009, 22:34
autor: Ad4m
Dzięki, wszystko działa ;)