LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-08-2008, 11:15 AM   #1
DennisC31
Member
 
Registered: May 2007
Location: beyond my means
Distribution: Mint 11.04
Posts: 55

Rep: Reputation: 19
C++ compiler cannot create executables (solution)


Just thought I would put this question out and supply the answer since I had trouble with it.

While compiling rsyncrypto-1.11, I got the error C++ compiler cannot create executables.

I hadn't installed gcc-c++ AND the extracted file was not chowned to root.

So, if you get this error, check that gcc-c++ is actually installed (rpm -qa |grep gcc) and then change rights on the source code directory (chown -R root:root <path to source directory>).

-DennisC31

Last edited by DennisC31; 04-11-2012 at 05:40 PM.
 
Old 07-08-2008, 11:41 AM   #2
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 235Reputation: 235Reputation: 235
Yeah, usual Fedora and Red Hat installs won't include gcc, you have to specify it. Also, it's not always needed to change the source directory to root:root. Usually during compile time you're installing as root if you want the program system wide and not for an individual user account, etc.
 
Old 07-08-2008, 02:38 PM   #3
jdines
LQ Newbie
 
Registered: Jul 2008
Posts: 19

Rep: Reputation: 0
Exclamation NEVER compile as the root user!

Quote:
While compiling rsyncrypto-1.11, I got the error C++ compiler cannot create executables.
Presumably you were not compiling. You were running ./configure.

Code:
I hadn't installed gcc-c++ AND the extracted file was not chowned to root.
What extracted file?

Quote:
So, if you get this error, check that gcc-c++ is actually installed (rpm -qa |grep gcc) and then change rights on the source code directory (chown -R root:root <path to source directory>).
The first part is correct, but you should NOT be changing the source code to be owned by root. NEVER compile as the root user! You should do the autoconf, ./configure, and make as a normal user, and then do the make install, and ONLY the make install as root.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
C compiler cannot create executables 70mas Linux - Server 3 01-02-2007 12:54 AM
C compiler cannot create executables Bazbo Linux - Software 5 11-21-2006 01:05 AM
Compiler cannot create executables Cheechi Ubuntu 6 07-09-2006 01:15 AM
C compiler cannot create executables shams Linux - Software 6 06-12-2004 01:55 PM
C compiler cannot create executables JanDeMan Debian 7 04-20-2004 02:10 AM


All times are GMT -5. The time now is 06:34 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration