Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

configure: error: C++ compiler cannot create executables

Tags:

c++

g++

I am trying to install Robocup simulator from https://sourceforge.net/projects/sserver/?source=typ_redirect . As mentioned in the README file in the folder to build it I have to execute /.configure but I get this error.

saurabh@saurabh-GL502VM:~/intelligent_systems/project/rcssserver-15.3.0$ ./configure 
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 whether make supports nested variables... yes
checking for g++... no
checking for c++... no
checking for gpp... no
checking for aCC... no
checking for CC... no
checking for cxx... no
checking for cc++... no
checking for cl.exe... no
checking for FCC... no
checking for KCC... no
checking for RCC... no
checking for xlC_r... no
checking for xlC... no
checking whether the C++ compiler works... no
configure: error: in `/home/saurabh/intelligent_systems/project/rcssserver-15.3.0':
configure: error: C++ compiler cannot create ex

Now when I checked my g++ compiler.

saurabh@saurabh-GL502VM:~/intelligent_systems/project/rcssserver-15.3.0$ g++ -v
The program 'g++' is currently not installed. You can install it by typing:
sudo apt install g++

But when I tried to install g++ compilier I got this:

saurabh@saurabh-GL502VM:~/intelligent_systems/project/rcssserver-15.3.0$ sudo apt install g++
Reading package lists... Done
Building dependency tree       
Reading state information... Done
g++ is already the newest version (4:5.3.1-1ubuntu1).
The following packages were automatically installed and are no longer required:
  cpp-4.8 libcloog-isl4 xserver-xorg-legacy
Use 'sudo apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 7 not upgraded.

Now, what should I do to install the the simulator? Thanks!

like image 204
talos1904 Avatar asked Jun 23 '26 22:06

talos1904


1 Answers

apt-get can find multiple versions of g++, and even install them side by side. But clearly "g++" on the command line must be a shortcut to only one of them. You can change that shortcut with sudo update-alternatives --config g++.

like image 73
MSalters Avatar answered Jun 26 '26 17:06

MSalters



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!