Jump to content

Error trying to compile a c++ source file


Recommended Posts

hello!

well I cannot compile anything using the gcc, I have mandrake 10.1 community release installed and at first I was surprised it did not have a c++ compiler installed by default. and i checked to install all the development package...

finally I decided to install the gcc so I downloaded version 4.0.0 and got to it...it took about an hour to build and like 5 mins to install and even when after installing there were no error messages I still can't get to compile anything.

I tried:

gcc test.cpp

and got

gcc: installation problem, cannot exec `cc1plus': No such file or directory

And I don't know what to do...I am not so much experienced with mandy/linux

Thanks :)

 

[moved from Software by spinynorman]

Link to comment
Share on other sites

urpmf shows what is available

rpm -qa | grep shows what is installed

localhost:/# urpmf cc1plus

gcc-c++:/usr/lib/gcc/i586-mandrake-linux-gnu/3.4.3/cc1plus

gcc2.96-c++:/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/cc1plus

gcc4.0-c++:/usr/lib/gcc/i586-mandrake-linux-gnu/4.0.0/cc1plus

gccxml:/usr/bin/gccxml_cc1plus

gcc3.3-c++:/usr/lib/gcc-lib/i586-mandrake-linux-gnu/3.3.4/cc1plus

localhost:/# rpm -qa | grep gcc

gcc-cpp-3.4.3-7mdk

gcc-c++-3.4.3-7mdk

gcc-3.4.3-7mdk

libgcc1-3.4.3-7mdk

Link to comment
Share on other sites

yes, I did select the whole package.

and I got the next message after using the rpm:

[purefan@dhcp-1397-25 purefan]$ rpm -qa | grep

Usage: grep [OPTION]... PATTERN [FILE]...

Try `grep --help' for more information.

Link to comment
Share on other sites

You need to give an argument to grep, what grep is 'grepping' for:

 

rpm -qa | grep gcc

 

to see, in all installed packages, which contain 'gcc'.

Link to comment
Share on other sites

oh..forgive me, Im kind of new to "linuxing"

this is what I got:

 

[purefan@dhcp-1397-25 purefan]$ rpm -qa | grep gcc

gcc-cpp-3.4.1-3mdk

gcc2.96-cpp-2.96-0.83mdk

libgcc1-3.4.1-3mdk

gcc-3.4.1-3mdk

 

do I need to install anything??

Link to comment
Share on other sites

and following bvc's example:

 

[purefan@dhcp-1397-25 purefan]$ urpmf --name cc1plus

[purefan@dhcp-1397-25 purefan]$ urpmf cc1plus

Note: since no media searched uses hdlists, urpmf was unable to return any result

You may want to use --name to search for package names.

Link to comment
Share on other sites

Considering the version of your installed gcc and the results of bvc's search:

gcc-c++-3.4.3-7mdk

 

I would try, as root, on your machine:

 

urpmi gcc-c++

 

I don't know why urpmf did not work for you. I have not seen that error, before. I always use the hdlist.cz (also used when 'maximum information' is checked in the Software Installation Manager of Software Management) instead of the smaller, synthesis.hdlist.cz file. You can also edit the path in Software Media Manager to point to the hdlist.cz instead of synthesis.hdlist.cz file.

Link to comment
Share on other sites

Ok here it is! at least I feel we're getting somewhere.

it looks now like my gcc was not installed...but it was! or at least I thought it was...

I downloaded the 40megs file

unzip...

configure (in a separate folder as it said)

built (for the hour it took to finish)

and installed!

...not much that could go wrong I think....

and in each phase it ended with no message error...so I assumed it was properly installed....

<sigh>

 

[root@dhcp-1397-25 root]# urpmi gcc-c++

no package named gcc-c++

 

[root@dhcp-1397-25 root]# urpmi gcc

Everything already installed

 

[root@dhcp-1397-25 root]# urpmi c++

The following packages contain c++:

libflac++4

libsigc++1.0_0

libstdc++5

libstdc++6

libstdc++6-devel

 

[root@dhcp-1397-25 root]# urpmi g++

no package named g++

Link to comment
Share on other sites

This is from a 10.1 install (Official Power Pack download, installed from isos extracted to hard disk):

# urpmq --sources gcc-c++
file://mnt/hd//media/main5/gcc-c++-3.4.1-4mdk.i586.rpm

 

I think that means CD5, which might be why you can't find it in community. Maybe you could find it on the ftp tree for 10.1 on one of the mirrors or maybe you could set up a main source for 10.1 at EasyUrpmi

Link to comment
Share on other sites

hmmmm.....curious...when I downloaded the Community Release it was only 3 CDs....

perhaps the gcc is already to install from the PowerPack Download...I will try to download the PowerPack, it is free right? ;-)

now that I think of it....

1 cd = 600 Megs (about)

5 CDs = 3gbs...

3 GBs / 15kb/s...its gonna be a while...:S

Link to comment
Share on other sites

The community edition is the free edition. At the EasyUrpmi link I gave, you can configure for 10.1 Official to see some mirrors that have the Official tree. If you follow the directions and add the urpmi source for official main, urpmi might want to update a lot of packages, I don't know, I have always run official. Anyway, you can browse the mirror and download/install only the package(s) you need, such as:

ftp://ftp.proxad.net/pub/Distributions_Li...1-4mdk.i586.rpm

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...