Author Topic: Compilation failed in Ubuntu (g++ not found)  (Read 6183 times)

0 Members and 1 Guest are viewing this topic.

Offline SirCrow

  • Forum Regular
  • Posts: 144
    • View Profile
Compilation failed in Ubuntu (g++ not found)
« on: June 24, 2018, 02:24:55 am »
Well, here we go again...
I reformatted a partition, wrecked my Ubuntu installation, reinstalled it alongside the old one.  And now I can't compile my programs.  The file compilelog.txt shows: sh: 1: g++: not found

I thought I had installed g++ using $ sudo apt-get remove g++
...HUNDREDS of files appeared to be installed, but the IDE still fails to compile.  What am I missing this time???
I may not always finish what I've started....

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #1 on: June 24, 2018, 02:35:05 am »
I thought I had installed g++ using $ sudo apt-get remove g++
sudo apt-get remove g++ doesn't installed, it removes it. Try sudo apt-get install g++
if (Me.success) {Me.improve()} else {Me.tryAgain()}


My Projects - https://github.com/AshishKingdom?tab=repositories
OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

Offline SirCrow

  • Forum Regular
  • Posts: 144
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #2 on: June 24, 2018, 02:38:10 am »
Firstly, why don't I see the Modify option on my posts?

Secondly.....NEVER MIND my previous post.  I just ran setup_lnx.sh  and now it compiles normally. 
Is that what fixed it?  I wouldn't know;  I'm still learning my way around Linux.  Thanks.
I may not always finish what I've started....

Offline SirCrow

  • Forum Regular
  • Posts: 144
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #3 on: June 24, 2018, 02:41:25 am »
I thought I had installed g++ using $ sudo apt-get remove g++
sudo apt-get remove g++ doesn't installed, it removes it. Try sudo apt-get install g++

No, I pasted the wrong command here.  I did actually run sudo apt-get install g++ and then removed and installed again, with different results.
In any case, I seem to have fixed the issue, not that  I fully understand how.
I may not always finish what I've started....

Offline Ashish

  • Forum Resident
  • Posts: 630
  • Never Give Up!
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #4 on: June 24, 2018, 02:41:50 am »
Firstly, why don't I see the Modify option on my posts?

Secondly.....NEVER MIND my previous post.  I just ran setup_lnx.sh  and now it compiles normally. 
Is that what fixed it?  I wouldn't know;  I'm still learning my way around Linux.  Thanks.
I'm also not getting modify option on my post. Maybe it is disable by Odin.
Good to hear that you solve the issue.
if (Me.success) {Me.improve()} else {Me.tryAgain()}


My Projects - https://github.com/AshishKingdom?tab=repositories
OpenGL tutorials - https://ashishkingdom.github.io/OpenGL-Tutorials

Offline SirCrow

  • Forum Regular
  • Posts: 144
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #5 on: June 24, 2018, 03:11:40 am »
I'm also not getting modify option on my post. Maybe it is disable by Odin.
Good to hear that you solve the issue.

Yes, but wouldn't it be nice if you always knew exactly what you did that fixed a problem?  There will always be a next time, yes?

EDIT: I just saw the Modify option and used it.  But will it be there the next time?
« Last Edit: June 24, 2018, 03:15:18 am by SirCrow »
I may not always finish what I've started....

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #6 on: June 24, 2018, 09:45:37 am »
Easy fix, get Windows.

Yeah, I know, too easy... ;D

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #7 on: June 24, 2018, 09:54:31 am »
Modify has been put on a very short leash, good luck!

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #8 on: June 24, 2018, 10:03:03 am »
Here is where /when I first discovered Modify modified;

Offline bplus

  • Global Moderator
  • Forum Resident
  • Posts: 8053
  • b = b + ...
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #9 on: June 24, 2018, 10:08:22 am »
I swear it changed the moment I was posting reply #9!

So there is a 2 or 3 Minute time limit, I am guessing to use Modify...

But I wonder...
1. if post then press Modify and sit in editor for awhile...
2. applied to only certain folks say as punishment
3. if this is to prevent post deletions after some one is posted or posting a reply
4, why Fellippe hasn't said anything about this change
« Last Edit: June 24, 2018, 10:13:42 am by bplus »

Offline SirCrow

  • Forum Regular
  • Posts: 144
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #10 on: June 24, 2018, 12:55:24 pm »
I swear it changed the moment I was posting reply #9!

So there is a 2 or 3 Minute time limit, I am guessing to use Modify...

But I wonder...
1. if post then press Modify and sit in editor for awhile...
2. applied to only certain folks say as punishment
3. if this is to prevent post deletions after some one is posted or posting a reply
4, why Fellippe hasn't said anything about this change

All good points! ; )  I guess we'll just wait and see.
I may not always finish what I've started....

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #11 on: June 25, 2018, 05:55:32 am »
Well, here we go again...
I reformatted a partition, wrecked my Ubuntu installation, reinstalled it alongside the old one.  And now I can't compile my programs.  The file compilelog.txt shows: sh: 1: g++: not found

I thought I had installed g++ using $ sudo apt-get remove g++
...HUNDREDS of files appeared to be installed, but the IDE still fails to compile.  What am I missing this time???

Ouch! Reformat and reinstall is never fun...

Ashish is correct. That command will remove. But if memory serves, a fresh installation, has not get been configured to compile source code.

This is the process that I used:

(a fresh install of the OS is assumed)

Start a Terminal.

sudo apt-get update (enter)
sudo apt-get install build-essential (enter) - (installs tools for building source code - including g++)
sudo apt-get install freeglut3-dev (enter) - (install development libraries and headers for freeglut)

Navigate to where the QB64 tarball was extracted)

From with the directory: ./setup_lnx.sh (enter)

If the compilation finishes successfully, QB64 will automatically start for the first time.

(This works for Linux Mint and Linux Peppermint - Both are Ubuntu based)

J
Logic is the beginning of wisdom.

Offline SirCrow

  • Forum Regular
  • Posts: 144
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #12 on: June 25, 2018, 10:30:09 pm »
Ouch! Reformat and reinstall is never fun...

. . . if memory serves, a fresh installation, has not get been configured to compile source code.

This is the process that I used:

(a fresh install of the OS is assumed)

Start a Terminal.

sudo apt-get update (enter)
sudo apt-get install build-essential (enter) - (installs tools for building source code - including g++)
sudo apt-get install freeglut3-dev (enter) - (install development libraries and headers for freeglut)

Navigate to where the QB64 tarball was extracted)

From with the directory: ./setup_lnx.sh (enter)

If the compilation finishes successfully, QB64 will automatically start for the first time.

(This works for Linux Mint and Linux Peppermint - Both are Ubuntu based)

I'm not sure how I fixed the problem, but I did get it all working normally (although my compiled prog. does sometimes just quit inexplicably).
I will keep your set of steps on hand just in case, though.  Thanks, Johnno.
I may not always finish what I've started....

Offline johnno56

  • Forum Resident
  • Posts: 1270
  • Live long and prosper.
    • View Profile
Re: Compilation failed in Ubuntu (g++ not found)
« Reply #13 on: June 26, 2018, 01:02:42 am »
[banned user]:

Peppermint is based on Lubuntu. A 'trimmed' version of Ubuntu. Mainly designed for machines that are either low in resources or power. I have no idea what has been trimmed. But trimmed it is. I now know that g++ and freeglut3-dev are not part of the OS.... g++ is essential to compile and, if memory serves correctly, freeglut provides the gl libraries that QB64 needs. (best guess)

I would suggest that, if you laptop is 'up to it' (resources that is), perhaps using Ubuntu instead. If memory serves correctly, again, Ubuntu will require a 2gig dual core, 2 gig of ram (more is using a VM) and 20+ gig of storage.

Then there is the 'ultimate' fix... Dump Windows and migrate to Linux. The congregation shouts, "Hallelujah!"... lol

Or we can always return to QB4.5... At least we know THAT version of QB is almost rock solid... lol Oh. Then there is Python and Lua... Sorry. I digressed... Must be the extremely low levels of caffeine in the system... I must correct that or I may start rambling on about all sorts of nonsense... lol
Logic is the beginning of wisdom.