Help with gcc installation

Hello
First of all my story is quite complicated. I tried to make my CANON PIXMA MP160 works under debian. I found rpm packages from canon websites. Some suggestions I found on another web is to use "alien" to be able to convert/install rpm packages to debian format. I didn't have "alien" on my system so I downloaded it and installed with no problems. After trying to use "alien" I received a compliant and need to install "rpm" so I found it and tried to install. My gcc/cc was not found, look up for some help on the web. Nothing works. So I thought I could try to uninstall gcc from my system via synaptic package manager. After doing that I could not re-install gcc using the reverse method. I downloaded a new version of gcc and found out that I could not install it without gcc or cc which are not present on my system. The only C compiler in my machine is "cpp".

I would be appreciate if anyone could give me some help.

Thank you

0

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Help with gcc installation

'cpp' is not a compiler - that is the C preprocessor.

You can find compilers using the 'apt-cache' tool:

apt-cache search gcc-4

You might still have your *.deb packages in /var/cache/apt/archives. If you do, you can install your gcc from there using dpkg:
dpkg -i whateverpackage.deb
dpkg is the lowest level tool, so it will probably complain a lot about not installing other software; in the end you will probably need to give it a long list of things to install:
dpkg -i package1.deb package2.deb ...

I don't follow your post - you said RPM complained it couldn't find a compiler - so why did you remove your compiler?

What are you talking about when you say you got a new version of gcc - do you mean the source code?

Got gcc back but still doesn't work

Hi
When I first tried to install RPM system says "can't find suitable compilers (or sth similar); gcc: no cc: no". Type gcc in termial I receive

bash: gcc: command not found

A webpage I found suggests that the version of gcc I installed (comes with Debian DVD might be the problem)then I thought I had to uninstall and reinstall gcc. My bad!

However last night I found gcc-4.1.i386.deb in one of my directory which I downloaded from somewhere a few months earlier. Try to install and SYNAPTIC now says I have gcc installed. Again I type gcc in terminal still getting

bash: gcc: command not found

I found some info that system probably cannot locate where my gcc is. I typed "whereis gcc" and received "/usr/lib/gcc"/ And when I type $PATH "/usr/lib/gcc" is not there.I tried to add "/usr/lib/gcc" into the $PATH.

Like this:
PATH=$PATH:/usr/lib/gcc
export PATH

still didn't work, I tried "emacs .bash_profile" and added the two lines above into it. Again it still doesn't work.

I looked into /usr/lib/gcc, gcc is not there too.

$PATH
bash: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/bin/X11:/usr/lib/gcc: No such file or directory

Got gcc back but still doesn't work

The /usr/lib/gcc is NOT the executable; that is a directory for various libraries used by gcc. Your problem is not that gcc is the wrong version or not installed; the build scripts are not trying very hard to discover a compiler. You should be able to fix it with something like:

ln -s /usr/bin/gcc-4.1 /usr/bin/gcc

If you type 'gcc' and press [tab] twice you should be shown the options you have.

Getting there I feel,but C compiler default output file name...

Hello

I used your method.

ln -s /usr/bin/gcc-4.1 /usr/bin/gcc

This is what I got after pressing tab twice

Jabberwock:/home/isara/mp160/rpm-4.4.2.1# gcc
gcc gcc-4.1 gccbug-4.1 gccmakedep

However
jabberwock:/home/isara/mp160/rpm-4.4.2.1# ./configure
checking build system type... i686-pc-linux-gnulibc1
checking host system type... i686-pc-linux-gnulibc1
checking target system type... i686-pc-linux-gnulibc1
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... no
checking for mawk... mawk
checking whether make sets $(MAKE)... yes
checking how to create a ustar tar archive... gnutar
checking for style of include used by make... GNU
checking for gcc... gcc
checking for C compiler default output file name...
configure: error: C compiler cannot create executables
See `config.log' for more details.

At least I am getting something more positive when running configure script.

Sorry for the trouble but what is the default file name (?.o) How do I go from here.

Getting there I feel,but C compiler default output file name...

How bizarre... a C compiler that can't create executables.

See if the development files/libraries are there:
dpkg -s libc6
dpkg -s libc6-dev

If it's not installed then install it and your gcc should be able to build executable files again. At least that's what I think the problem is - I haven't seen this message for a very long time. I'm pretty sure it's been mentioned in this forum before, so you might try searching the archives too.

libc6 already installed but not libc6-dev

isara@jabberwock:~$ dpkg -s libc6
Package: libc6
Status: install ok installed
Priority: required
Section: libs
Installed-Size: 11032
Maintainer: GNU Libc Maintainers
Architecture: i386
Source: glibc
Version: 2.3.6.ds1-13
Replaces: ldso (<= 1.9.11-9), timezone, timezones, gconv-modules, libtricks, libc6-bin, netkit-rpc, netbase (<< 4.0)
Provides: glibc-2.3.6.ds1-1, glibc-2.3.6-2
Depends: tzdata
Suggests: locales, glibc-doc
Conflicts: strace (<< 4.0-0), libnss-db (<= 2.2-6.1.1), timezone, timezones, gconv-modules, libtricks, libc6-doc, libc5 (<< 5.4.33-7), libpthread0 (<< 0.7-10), libc6-bin, libwcsmbs, apt (<< 0.3.0), libglib1.2 (<< 1.2.1-2), netkit-rpc, wine (<< 0.0.20031118-1), cyrus-imapd (<< 1.5.19-15), e2fsprogs (<< 1.35-7), initrd-tools (<< 0.1.84.1), libterm-readline-gnu-perl (<< 1.15-2)
Conffiles:
/etc/init.d/glibc.sh e962bedb636c5499e97ce457878a754a
/etc/ld.so.conf.d/i486-linux-gnu.conf 36f09aeeab18f6af453d0a1db0a0942c
Description: GNU C Library: Shared libraries
Contains the standard libraries that are used by nearly all programs on
the system. This package includes shared versions of the standard C library
and the standard math library, as well as many others.

isara@jabberwock:~$ dpkg -s libc6-dev
Package `libc6-dev' is not installed and no info is available.
Use dpkg --info (= dpkg-deb --info) to examine archive files,
and dpkg --contents (= dpkg-deb --contents) to list their contents.
isara@jabberwock:~$

Should I need to worry about libc6-dev?

I checked under synaptic I have two version of libc6:
1. libc6 2.3.6.dsl-13
2. libc6-i686 2.3.6.dsl-13 [i686 optimized]

Somehow I feel like libc6 is already there, but there is no link to it or something (thinking in my stupid mode). As you have suggested to me before about making link to 'gcc'.

I looked into /lib (as root) there is libc.so.6.

Just out of town for a day. Now searching in old archive. Wish me some luck.

Thank you so much.

more to previous message somehow the rest don't show

Should I need to worry about libc6-dev?

I checked under synaptic I have two version of libc6:
1. libc6 2.3.6.dsl-13
2. libc6-i686 2.3.6.dsl-13 [i686 optimized]

Somehow I feel like libc6 is already there, but there is no link to it or something (thinking in my stupid mode). As you have suggested to me before about making link to 'gcc'.

I looked into /lib (as root) there is libc.so.6.

Just out of town for a day. Now searching in old archive. Wish me some luck.

Thank you so much.

Found a might-be solution, still more than what meets the eyes

I have the same problem with Chris Bannister. "Configure error: C compiler cannot create executables"

Chris found his own solution as not having g++ installed (g++ and gcc depends on each other, he mentioned)

First of all I did not have "gcc" at all. I downloaded and installed gcc-4.1_4.1.1-21_i386.deb. Then I got "Configure error: C compiler cannot create executables". After reading Chris's messages I downloaded g++-4.1_4.1.1-21_i386.deb, tried to installed with GDebi package installer."Error: Dependency is not satisfiable: libstdc++c-4.1-dev".

So I downloaded libstdc++c-4.1-dev_4.1.1_21_i386.deb,tried to install "Error:Dependency is not satisfiable:g++-4.1"

Now I downloaded and tried to install g++-4.1_4.1.1-21_i386.deb "Error:Dependency is not satisfiable: libstdc++6-4.1-dev"

Things seem to be going into an infinite loop. What do I do from here. Any suggestion, please?

Found a might-be solution, still more than what meets the eyes

Quote:
"g++ and gcc depends on each other, he mentioned"

That is absolutely not true. gcc does not need g++ even though g++ needs gcc.

Did you install the libc6-dev?

Can't find the package

Hello

I have libc6-dev_2.3.6.dsl-13.i386.deb installed, looked up in debian packages page but libc6-dev_2.3.6.dsl-13.i386.deb cannot be found there.

so, I searched for the latest version of libc6 and libc6-dev. I found libc6_2.3.6.dsl-13etch2.i386.deb and libc6-dev_2.3.6.dsl-13etch2.i386.deb. But when I tried to install libc6_2.3.6.dsl-13etch2.i386.deb. It complians as follows:

Can't find the package continued

failed in buffer_write(fd) (9, ret=-1): backend dpkg-deb during `./lib/tls/libc-2.3.6.so': No space left on device
dpkg-deb: subprocess paste killed by signal (Broken pipe)
Errors were encountered while processing:
///home/isara/Desktop/libc6_2.3.6.ds1-13etch2_i386.deb
RESULT=1

Looks like I have not got any space left on the partition the packages need to be installed? If so, is there and alternative way to install them in other directory/partition?

Thank you again

Can't find the package continued

what's your /etc/fstab look like and what's your partitioning like?

You can get partition information with fdisk, for example:
fdisk -l /dev/hda

/dev/hda1 looks filled up

isara@jabberwock:~$ fdisk -l /dev/hda
bash: fdisk: command not found
isara@jabberwock:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 264445 261760 0 100% /
tmpfs 156324 0 156324 0% /lib/init/rw
udev 10240 68 10172 1% /dev
tmpfs 156324 0 156324 0% /dev/shm
/dev/hda9 29403936 17828180 10082116 64% /home
/dev/hda8 381138 10324 351136 3% /tmp
/dev/hda5 4806904 2457852 2104868 54% /usr
/dev/hda6 2885780 480180 2259012 18% /var
isara@jabberwock:~$

/dev/hda1 looks filled up

That's a very strange setup - is there any reason you put in so many partitions?

The only solution I can think of is:
1. create a directory in /usr:
mkdir /usr/lib_copy
2. copy the contents of /lib:
cp -a /lib /usr/lib_copy
3. remount the copy over the original:
mount --bind /usr/lib_copy /lib

To make that all permanent you will need a Live CD to safely complete the job, which is to delete the original contents of /lib and make /lib a symlink to /usr/lib_copy. That way you don't have to remount on each boot and you also recover the storage currently taken up by /lib.

Syndicate content