Tag: g ++

在Ubuntu 14.04上安装g ++ ccompiler时遇到问题

我尝试使用其他用户的软件包安装g ++。 离线..但有错误。 连接到网后,我尝试使用sudo apt-get install g++ ,但它提供了以下输出: gstreamer0.10-alsa is already the newest version. qtdeclarative5-ubuntu-ui-extras-browser-plugin is already the newest version. python-gconf is already the newest version. gstreamer0.10-tools is already the newest version. libglib2.0-0 is already the newest version. gir1.2-peas-1.0 is already the newest version. libatk-bridge2.0-0 is already the newest version. gnome-session-bin is already the newest […]

为什么我不能安装g ++?

尝试使用以下命令编译程序时: g++ -o 我发现了以下报告…… The program ‘g++’ can be found in the following packages: * g++ * pentium-builder Try: sudo apt-get install 然后我试着…… nawshad@ubuntu:~/Thesis/Codes/Thesis_Utility_Function/Test Codes$ sudo apt-get install g++ Reading package lists… Done Building dependency tree Reading state information… Done You might want to run ‘apt-get -f install’ to correct these: The following packages have […]

如何在Ubuntu(目前为14.04)中安装最新的g ++(目前为5.​​1)?

这个问题一直困扰着我! 上次为4.9我尝试了g ++ 4.9的回答中提到的命令。 同样的技巧现在不起作用: sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-5.1 g++-5.1 结果是… E: Unable to locate package gcc-5.1 E: Couldn’t find any package by regex ‘gcc-5.1’ E: Unable to locate package g++-5.1 E: Couldn’t find any package by regex ‘g++-5.1’ 在Ubuntu中直接安装最新g ++的正确命令是什么? 是否有任何魔法命令可以统一用于g ++的所有更新? 更新 : 我发现安装它的正确命令是: sudo apt-get install […]

在Ubuntu上获得+安装gcc / g ++ 4.9?

如何安装最新版本的gcc和g ++? 我正在使用各种C ++ 11和C ++ 1yfunction; 这就是我需要这个的原因。

如何选择默认的gcc和g ++版本?

所以我安装了gcc-4.4和gcc-4.3(对于g ++也一样)。 现在据我所知,Ubuntu中有一个工具,如果你只是告诉它你想要哪个版本,它会为你设置符号链接。 然而,它似乎不适用于最新版本,我觉得令人失望。 root@nexus:~# update-alternatives –config gcc update-alternatives: error: no alternatives for gcc. root@nexus:~# update-alternatives –config cc There is only one alternative in link group cc: /usr/bin/gcc Nothing to configure. root@nexus:~# dpkg -l | grep gcc | awk ‘{print $2}’ gcc gcc-4.3 gcc-4.3-base gcc-4.3-multilib gcc-4.4 gcc-4.4-base gcc-4.4-multilib gcc-4.5-base gcc-multilib lib32gcc1 libgcc1 有任何想法吗?