在ubuntu 13.04中安装g+ 4.8

时间:2022-04-06 20:19:06

I used:

我使用:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test    
sudo apt-get update
sudo apt-get install g++-4.8

in ubuntu 13.04 to install g++4.8. but when I wanted to compile a c++ program,for example world.cpp and I wrote g++ world.cpp I received:

在ubuntu 13.04中安装g++4.8。但是当我想要编译一个c++程序时,例如世界。cpp和我写了g++ world。cpp我收到:

/usr/local/bin/ld: this linker was not configured to use sysroots
collect2: error: ld returned 1 exit status

I am new to linux. I can not solve my problem with this

我是linux新手。我不能用这个来解决我的问题

1 个解决方案

#1


2  

Better to install meta-package build-essential that consists of all typically needed soft for compilation.

更好的方法是安装元包构建——这是非常重要的,它包含了编译所需的所有软件。

sudo apt-get install build-essential

#1


2  

Better to install meta-package build-essential that consists of all typically needed soft for compilation.

更好的方法是安装元包构建——这是非常重要的,它包含了编译所需的所有软件。

sudo apt-get install build-essential