2017-04-12 287 views
0

我想從https://sourceforge.net/projects/sserver/?source=typ_redirect安裝Robocup模擬器。正如在構建它的文件夾中的README文件中提到的,我必須執行/.configure,但是我得到這個錯誤。配置:錯誤:C++編譯器無法創建可執行文件

[email protected]:~/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 

現在,當我檢查我的g ++編譯器。

[email protected]:~/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++ 

但是,當我試圖安裝G ++ compilier我得到這個:

[email protected]:~/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. 

現在,我應該怎麼做才能安裝模擬器?謝謝!

回答

1

apt-get可以找到克多個版本++,甚至並排安裝它們的一面。但命令行上的「g ++」顯然只能是其中一個的捷徑。您可以用sudo update-alternatives --config g++更改該快捷方式。

+0

嘿!是的,這將工作,但無論如何它刪除了一個g ++版本。現在,一切正常。 – talos1904

0

首先確保g ++在你的PATH變量中。 echo $PATH看看它是否至少包含/bin:/usr/bin

然後嘗試find/-name g++,如果找到它,請將包含的文件夾添加到PATH。

如果不幫助,嘗試重新安裝G ++ apt-get remove g++; apt-get install g++

+0

我重新安裝了g ++,並且由於安裝了兩個g ++版本,系統發生了衝突。所以,我刪除了其中一個,現在一切都很好。謝謝! – talos1904

相關問題