我的Linux机器有以下定义:
RHEL 5.4
内核版本2.6.18
但是我没有g++命令。(我需要在Linux下编写c++程序)
例如:
[root@linux /etc]# g++
-bash: g++: command not found
我还尝试了以下几点:
yum install gcc
loaded plugins: security
Setting up Install Process
No package g++ available.
Nothing to do
我的问题是:如何安装/下载g++命令?从哪里可以得到g++?
我有gcc的命令,但这只是C程序,而不
我在Beagleboard上运行Angström。我安装了gcc和g++,用的命令是: opkg install gcc g++
现在,当我试图编译最简单的c和c++ hello world程序时,我得到了错误消息:
g++: error trying to exec 'as': execvp: No such file or directory
arm-angstrom-linux-gnueabi-gcc: error trying to exec 'as': execvp: No such file or directory
你认为遗漏了什么?
我正在阿尔卑斯Linux上建立gcc-7.3。当我运行make时,我会得到这些错误,
checking whether the C compiler works... configure: error: in `/build/x86_64-pc-linux-gnu/libgomp':
configure: error: cannot run C compiled programs.
If you meant to cross compile, use `--host'.
See `config.log' for more details.
make[2]: *** [M
几个月前,我在我的系统上构建并安装了gcc 4.8.2。今天我用它编译了一个使用C++11线程库的程序,当我运行它时,它抱怨说找不到正确版本的libstdc++。因此,我回到了gcc 4.8.2源码树,并手动将libstdc++-6.0.18复制到适当的位置。在那之后,程序运行正常。
莫名其妙的是,在我安装gcc的时候,它并没有自动安装。有没有办法在不手动复制文件的情况下安装它?
Edit in response to comments:错误消息:
./a.out: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.1
我正在尝试在Linux上安装gcc和g++ 4.9.2。我是Linux的新手,我看过一些如何安装的指南,但每次我都会遇到另一个问题。我的机器上现在没有叫gcc的人。我的Linux版本是: Red Hat Enterprise Linux Server release 7.4 (Maipo)可以有人帮助我,从头到尾给我指示如何正确做到这一点吗?非常感谢。
我已经从下载了gcc-4.1.2,并使用两个命令构建
./configure
make
现在我可以看到g++二进制文件了。但并不存在gcc二进制。
$ ls /opt/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/g++
/opt/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/g++
$ ls /opt/gcc-4.1.2/host-x86_64-unknown-linux-gnu/gcc/gcc
ls: cannot access /opt/gcc-4.1.2/host-x86_64-unknown-lin
成功安装theano之后,我使用:
import theano
它只是给我一个警告:
WARNING (theano.configdefaults): g++ not detected ! Theano will be unable to execute optimized C-implementations (for both CPU and GPU) and will
default to Python implementations. Performance will be severely degraded. To remove this warning, set Theano fl
我正在尝试安装PARI/GP,在配置步骤中我得到:
$ ./Configure
[...]
Looking for the compilers ...
...cc is /usr/bin/cc
...gcc is /usr/local/bin/gcc
GNU compiler version 4.8.0 20120705 (experimental) (GCC)
###
### C compiler does not work. PARI/GP requires an ANSI C compiler! Aborting.
###
### Compiler was: /usr/local/bin
我有一个关于libstdc++.so的问题。
我安装了一个新版本的gcc,并尝试编译C++代码。编译成功了,但是当我尝试执行二进制文件(m5.opt是它的名字)时,我得到了以下错误:
build/ALPHA_SE/m5.opt: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.9' not found (required by build/ALPHA_SE/m5.opt).
我需要更换libstdc++.so吗?如果是这样,我可以在哪里下载我想要的版本?在gcc的网站上,他们说libstdc++现在是gcc的一部分。
详细信息
GCC:我
我刚刚在我的华硕EeePC上网本上升级到了Ubuntu11.04,在使用G++时遇到了问题。使用G++编译任何程序,即使是简单的"Hello World",无论是使用iostream、cstdio还是stdio.h,都会失败,并显示以下消息:
/usr/lib/i386-linux-gnu/gcc/i686-linux-gnu/4.5.2/libstdc++.so: undefined reference to `_Unwind_GetIPInfo@GCC_4.2.0'
collect2: ld returned 1 exit status
我使用Synaptic Pa
自从我根据指南在wsl2 ubuntu20.04上安装以来,我一直有与libstc++.so.6相关的错误,特别是GLIBCXX_3.4.26 not found (required by ...),其中.引用/opt/OpenFOAM/ThirdParty-v2006/platforms/linux64/gcc-6.3.0/lib64/中的不同文件,以.so、.so.1、.so.6等结尾(例如,在运行paraFoam时,大约有20个这样的文件会出现错误)。我能够成功地可视化空腔教程(在窗口截视安装)。
我可以按照用户laborg在1月4日对julia提出的类似问题(参见)的建议,将libst
我最近安装了VS代码,我无法下载g++编译器。我输入sudo apt install g++并返回
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
binutils binutils-common binutils-x86-64-linux-gnu cpp cpp-7 g++-7 gcc gcc-7 gcc-7-base libasan4 libatomic