Ubuntu编译出现C++ compiler cannot create executables

本文介绍了解决g++及相关依赖库的安装问题的方法。通过新立得软件包管理器搜索并安装g++-4.1、libstdc++6-4.1-dev等组件,能够有效修复编译错误。

去新立得搜索 g++ g++-4.1 libstdc++6-4.1-dev  标记安装,一般就能解决问题。

注意g++-4.1 libstdc++6-4.1-dev新立得可能显示更加新的版,安装时要灵活应对。

fatal: [192.168.4.110]: FAILED! => {"changed": true, "cmd": "cd /usr/src/libmcrypt-2.5.8/ && ./configure &&make && make install\n", "delta": "0:00:01.351200", "end": "2025-06-27 02:50:45.380795", "msg": "non-zero return code", "rc": 77, "start": "2025-06-27 02:50:44.029595", "stderr": "configure: error: C++ compiler cannot create executables\nSee `config.log' for more details.", "stderr_lines": ["configure: error: C++ compiler cannot create executables", "See `config.log' for more details."], "stdout": "checking build system type... x86_64-redhat-linux-gnu\nchecking host system type... x86_64-redhat-linux-gnu\nchecking target system type... x86_64-redhat-linux-gnu\nchecking for a BSD-compatible install... /usr/bin/install -c\nchecking whether build environment is sane... yes\nchecking for gawk... gawk\nchecking whether make sets $(MAKE)... no\nchecking whether to enable maintainer-specific portions of Makefiles... no\nchecking whether make sets $(MAKE)... (cached) no\nchecking for g++... no\nchecking for c++... no\nchecking for gpp... no\nchecking for aCC... no\nchecking for CC... no\nchecking for cxx... no\nchecking for cc++... no\nchecking for cl... no\nchecking for FCC... no\nchecking for KCC... no\nchecking for RCC... no\nchecking for xlC_r... no\nchecking for xlC... no\nchecking for C++ compiler default output file name... ", "stdout_lines": ["checking build system type... x86_64-redhat-linux-gnu", "checking host system type... x86_64-redhat-linux-gnu", "checking target system type... x86_64-redhat-linux-gnu", "checking for a BSD-compatible install... /usr/bin/install -c", "checking whether build environment is sane... yes", "checking for gawk... gawk", "checking whether make sets $(MAKE)... no", "checking whether to enable maintainer-specific portions of Makefiles... no", "checking whether make sets $(MAKE)... (cached) no", "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... no", "checking for FCC... no", "checking for KCC... no", "checking for RCC... no", "checking for xlC_r... no", "checking for xlC... no", "checking for C++ compiler default output file name... "]}
06-28
root@ubuntu:/home/master/Desktop# cd emane root@ubuntu:/home/master/Desktop/emane# ./autogen.sh && ./configure && make deb libtoolize: putting auxiliary files in '.'. libtoolize: copying file './ltmain.sh' libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4'. libtoolize: copying file 'm4/libtool.m4' libtoolize: copying file 'm4/ltoptions.m4' libtoolize: copying file 'm4/ltsugar.m4' libtoolize: copying file 'm4/ltversion.m4' libtoolize: copying file 'm4/lt~obsolete.m4' configure.ac:53: installing './compile' configure.ac:53: installing './config.guess' configure.ac:53: installing './config.sub' configure.ac:41: installing './install-sh' configure.ac:41: installing './missing' src/agents/gpsdlocation/Makefile.am: installing './depcomp' checking for a BSD-compatible install... /usr/bin/install -c checking whether build environment is sane... yes checking for a thread-safe mkdir -p... /usr/bin/mkdir -p checking for gawk... no checking for mawk... mawk checking whether make sets $(MAKE)... no checking whether make supports nested variables... no 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/master/Desktop/emane': configure: error: C++ compiler cannot create executables See `config.log' for more details
最新发布
07-03
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值