Jump to content

Error trying to compile a c++ source file

Recommended Posts


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






localhost:/# rpm -qa | grep gcc





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






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:



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


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....



[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++:







[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++


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:


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.

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.


  • Create New...